-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
BS Modal on mobile view, throwing error on close button click #41090
Comments
I met this too! |
I can confirm the presence of this message while triggering the modals in our own documentation (but not all the times) in Chrome and Microsoft Edge. The message is not there on Firefox. Example of error message:
<div class="modal fade" id="exampleModalLong" tabindex="-1" aria-labelledby="exampleModalLongTitle"
style="display: none;" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">flex<div class="modal-header">…</div>flex<div class="modal-body"
style="min-height: 1500px">
<p>"This is some
placeholder content to show the scrolling behavior for modals. Instead of repeating the text in the modal, we
use an inline style to set a minimum height, thereby extending the length of the overall modal and
demonstrating the overflow scrolling. When content becomes longer than the height of the viewport, scrolling
will move the modal as needed."</p>
</div>
<div class="modal-footer">flex<button type="button" class="btn
btn-secondary" data-bs-dismiss="modal">Close</button><button type="button" class="btn btn-primary">Save
changes</button></div>
</div>
</div>
</div> The error message advises to use the |
reported here: #41005 |
Thanks @bravedave, hadn't spotted it was a duplicate. So I'm closing this one. |
Prerequisites
Describe the issue
On Mobile View, click on the close button, we get
Blocked aria-hidden on an element because its descendant retained focus. ....
Reduced test cases
Can test in https://getbootstrap.com/docs/5.3/components/modal/#how-it-works
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
5.3
The text was updated successfully, but these errors were encountered: