Bootstrap 5.2.0-beta1 scrollable Modal's Footer buttons not accessible on Safari 15.5
See original GitHub issueI have a Modal that has enough content that it requires scrolling in order to see the Cancel (and Save) buttons in the modal-footer.
If I use Safari 15.5 on macOS 12.4, the modals are displayed correctly; however, when I scroll to the modal-footer then click on either the Cancel or Save buttons, the click on the buttons is not accepted and the modal scrolls back to the top.
The problem is entirely due to the need to scroll. If the modal-body can be displayed without scrolling, the buttons in the modal-footer work fine.
On Chrome 103 and Firefox 102 on the same machine, the problem does not occur.
This HTML will reproduce the issue on Safari 15.5…
<div
class="modal fade show"
id="workshopModal"
aria-labelledby="workshopModalTitle"
style="display: block; padding-left: 0px"
aria-modal="true"
role="dialog"
>
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="workshopModalTitle">Modal Title</h5>
<button
type="button"
data-bs-dismiss="modal"
class="btn-close"
aria-label="Close"
></button>
</div>
<div class="modal-body" style="min-height: 80rem">Whatever</div>
<div class="modal-footer">
<button data-bs-dismiss="modal" type="button" class="btn btn-secondary">
Cancel
</button>
</div>
</div>
</div>
</div>
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Browsers and devices · Bootstrap v5.2
Supported browsers. Mobile devices; Desktop browsers · Internet Explorer · Modals and dropdowns on mobile. Overflow and scrolling; iOS text fields and scrolling...
Read more >Modal does not work in safari - Material Design for Bootstrap
Hi there, I have a enquiry modal which is working well in chrome, but for some strange reason it is not working in...
Read more >Bootstrap 5 Pop-up Modals: Cheat Sheet
The Bootstrap header contains a close button that dismisses the modal in addition to the modal title. The class attribute value is modal-header ......
Read more >@material-ui/core | Yarn - Package Manager
React components for faster and simpler web development. Build your own design system, or start with Material Design. ... Installation. Material-UI is available...
Read more >front-end/node_modules/@material-ui/styles/CHANGELOG.md
[Card] Fix TypeScript not recognizing "component" prop (#20179) @rart ... [docs] Add warning disabled button in Safari (#18072) @itayyehezkel ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t recreate it in CodePen for some reason yet it’s 100% reproducible in my SveteKit project both using vite as the dev server and in production builds. Very frustrating.
Let me work up a more detailed CodePen using 5.2.0-beta1 as that’s what I’m using. I added an event handler to set focus on an input when the dialog has been shown. When I removed that, I did not get the behavior with the buttons in the modal-footer. Let me see if I can make a more detailed example. Perhaps I left something important out.