Navigation Menu

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

feat(modal) Make enforceFocus configurable #706

Merged
merged 1 commit into from Jul 17, 2017

Conversation

dedene
Copy link
Contributor

@dedene dedene commented Jul 17, 2017

In our project, we needed to launch a secondary modal with some form inputs from a Bootstrap-Vue Modal. Due to the "enforceFocus", this was not possible.

If we make this feature configurable, we can use the also when used with a secondary form modal launched from within the first modal.

@dedene dedene changed the title Make enforceFocus configurable fix(modal) Make enforceFocus configurable Jul 17, 2017
@tmorehouse tmorehouse self-requested a review July 17, 2017 14:02
@tmorehouse tmorehouse changed the title fix(modal) Make enforceFocus configurable feat(modal) Make enforceFocus configurable Jul 17, 2017
@tmorehouse
Copy link
Member

Side note: multiple modals open at once are not supported in Bootstrap V4. The first modal must be closed before the second modal opens.

Once caveat with disabling enforce focus is that non-sighted users (and keyboard-only users) may not be able to find the modal if tab focus leaves the modal content area.

Native Bootstrap V4 alpha enforces focus on the active modal (i.. tabbing will cycle through the content of the modal), and is not configurable.

@dedene
Copy link
Contributor Author

dedene commented Jul 17, 2017

I absolutely follow your comments about non-sighted users.

Our use case was i.e. when using a WYSIWYG editor inside a modal, which opens another (non-bootstrap) modal for editing an image or link... in which the input fields will be unreachable as long as the enforceFocus callback is enabled.

I thought it might be convenient for others to also have the options to turn off the "enforceFocus" if necessary.

@tmorehouse
Copy link
Member

Ah... OK I see your use case.

So you could turn off enforce focus on the fly, and then re-enable it when the WYSIWYG editor modal closes.

@tmorehouse
Copy link
Member

I will need to update the documentation for this new prop once this is merged.

@tmorehouse tmorehouse merged commit f1ab80b into bootstrap-vue:master Jul 17, 2017
@dedene
Copy link
Contributor Author

dedene commented Jul 17, 2017

👍 Awesome, thanks a lot!

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

Successfully merging this pull request may close these issues.

None yet

2 participants