Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document when/how to override Modal's enforceFocus #20603

Closed
ocxers opened this issue Sep 1, 2016 · 3 comments
Closed

Document when/how to override Modal's enforceFocus #20603

ocxers opened this issue Sep 1, 2016 · 3 comments

Comments

@ocxers
Copy link

ocxers commented Sep 1, 2016

OS: OS X v10.11.6
Browser: Firefox v48.0.1
Bootstrap: v3.3.7
Description: if there is no modal, the input box can get focus; if clicks the button "Launch demo modal", the input box can not get focus any more.
Note: The modal should be high enough to show the vertical scrollbar.
JSBin: https://jsbin.com/xegenuzuve/edit?html,css,js,output

@cvrebert
Copy link
Collaborator

cvrebert commented Sep 1, 2016

Approximate duplicate of #12142. The workaround is to override the $.fn.Modal.prototype.enforceFocus method.
#19850 tracks improving enforceFocus in v4.
We aren't likely to try to change v3 here, since it's in maintenance-mode, but the workaround is worth finally documenting properly, so recategorizing this as a documentation issue.

@cvrebert cvrebert changed the title Input[type=text] can not get focus in a fixed overlay over a large modal which has a vertical scrollbar. Document when/how to override Modal's enforceFocus Sep 1, 2016
@ocxers
Copy link
Author

ocxers commented Sep 1, 2016

$.fn.modal.Constructor.prototype.enforceFocus = function() {};

Thanks.

@ocxers ocxers closed this as completed Sep 1, 2016
@cvrebert cvrebert reopened this Sep 1, 2016
@mdo
Copy link
Member

mdo commented Sep 5, 2016

Bootstrap 3 is no longer being officially developed or supported.

All work has moved onto our next major release, v4. As such, this issue or pull request is being closed as a "won't fix." For additional help and support, we recommend utilizing our community resources. Thanks for your understanding, and see you on the other side of v4!

<3,
@mdo and team

@mdo mdo closed this as completed Sep 5, 2016
@mdo mdo reopened this Sep 5, 2016
@mdo mdo closed this as completed Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants