-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
modal with long content on click backdrop will scroll to .modal-content top #1748
Comments
As documented here I think this is only a minor issue because no one will hold down the left mouse when clicking on the backdrop |
Enforce focus is a feature that only Bootstrap Vue has. So set no-enforce-focus to true will get behavior like pure Bootstrap. Is that interpretation right? |
@ganlvtech No, setting Click "Launch demo modal" and press |
Thanks, I got it. It's only a minor bug. |
In |
Nice solution! It helps a lot for me. |
* dev: (31 commits) feat(card): support left and right image placement (bootstrap-vue#1981) fix(collapse/toggle): "collapsed" class cleared when component updated (bootstrap-vue#2102) fix(form-file): Add validation of single file (bootstrap-vue#2028) chore(docs): minor update to the b-form-input docs chore(docs): Minor update to b-form-input docs feat(table): Add row-unhovered event (bootstrap-vue#1874) feat(table): Support contextmenu event binding for table rows (bootstrap-vue#2064) docs(table): fix minor typo (bootstrap-vue#2093) feat(table): Support sorting on nested object properties (bootstrap-vue#1868) perf(modal): optimize model.resetScrollbar, resolves bootstrap-vue#1831 (bootstrap-vue#1837) docs: Update images reference section (bootstrap-vue#1999) fix(observe-dom): fix comment typo (bootstrap-vue#2084) chore(modal): trivial word fix in comment (bootstrap-vue#2089) (docs): Fix grammer in Intro readme (bootstrap-vue#2092) fix(modal): prevent scrolling on .modal-content focus, fixes bootstrap-vue#1748 (bootstrap-vue#2060) feat(pagination): added slots for first, prev, next, last, and ellipsis. Fixes bootstrap-vue#1870. (bootstrap-vue#1980) Handle state change on validated fields. (bootstrap-vue#1984) fix(docs): input group prepend slot typo (bootstrap-vue#2059) fix(dependencies): replace opencollective with opencollective-postintall (bootstrap-vue#2067) fix(docs): change b-input-group attribute 'left' to 'prepend' (bootstrap-vue#2017) ...
System Information
Description
Test code can be found on CodePen. I have also run the test code on Edge and IE 11. There is nothing wrong on Edge. But on IE 11, it has the same problem.
When I click the backdrop and hold left mouse button down, the content will scroll to
.modal-content
's top. As a result, thescrollTop
attribute of.modal
will change to28px
(or1.75rem
) from zero.I found it may be caused by the
onFocusout
listener of.modal-content
. I can setno-enforce-force
totrue
to prevent this problem, but I don't know the reason why browsers behave differently.Test script
The text was updated successfully, but these errors were encountered: