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

Make Modal.enforceFocus easier to override/exempt #19850

Closed
zenorocha opened this Issue May 6, 2016 · 2 comments

Comments

Projects
None yet
4 participants
@zenorocha
Contributor

zenorocha commented May 6, 2016

For many years, dozens of third-party libraries have been facing the same issue with Bootstrap's modal. The answer so far has been "override enforceFocus" #16050 #12216 #11686 #10610 #8537 #7371 #6996 #5114

That led to many apps adding this line to their code:

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

Once they upgrade to Bootstrap 4, this line will no longer work. They will need to figure out that it changed to:

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

Instead of asking people to monkey patch their projects, shouldn't this functionality be revisited and fixed? Maybe starting from #12142?

@whodabudda

This comment has been minimized.

Show comment
Hide comment
@whodabudda

whodabudda Mar 20, 2017

Oy!! Days of trolling through code and finally stumbled on this! Thank you so much for the post. What a difference a character makes. It would be nice if 3rd party vendors kept the old interface and aliased it to the new, at least for a few releases as deprecated. I was ready to toss out bootstrap modals altogether.

whodabudda commented Mar 20, 2017

Oy!! Days of trolling through code and finally stumbled on this! Thank you so much for the post. What a difference a character makes. It would be nice if 3rd party vendors kept the old interface and aliased it to the new, at least for a few releases as deprecated. I was ready to toss out bootstrap modals altogether.

@Johann-S

This comment has been minimized.

Show comment
Hide comment
@Johann-S
Member

Johann-S commented May 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment