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

Projects
None yet
2 participants
@dedene
Contributor

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 from Make enforceFocus configurable to fix(modal) Make enforceFocus configurable Jul 17, 2017

@tmorehouse tmorehouse self-requested a review Jul 17, 2017

@tmorehouse tmorehouse changed the title from fix(modal) Make enforceFocus configurable to feat(modal) Make enforceFocus configurable Jul 17, 2017

@tmorehouse

This comment has been minimized.

Member

tmorehouse commented Jul 17, 2017

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

tmorehouse commented Jul 17, 2017

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

This comment has been minimized.

Member

tmorehouse commented Jul 17, 2017

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

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
@dedene

This comment has been minimized.

Contributor

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