-
-
Notifications
You must be signed in to change notification settings - Fork 79k
Closed
Labels
Description
Prerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
Describe the issue
After updating to Bootstrap 5.3.2 we have errors where modals are failing to open due to the query selector failing as invalid
selector-engine.js:41 Uncaught DOMException: Failed to execute 'querySelector' on 'Element': '#j_id22:exampleModal' is not a valid selector.
at Object.findOne (https://cdn.jsdelivr.net/npm/bootstrap@latest/dist/js/bootstrap.bundle.min.js:6:8558)
at Object.getElementFromSelector (https://cdn.jsdelivr.net/npm/bootstrap@latest/dist/js/bootstrap.bundle.min.js:6:9299)
at HTMLButtonElement.<anonymous> (https://cdn.jsdelivr.net/npm/bootstrap@latest/dist/js/bootstrap.bundle.min.js:6:55221)
at HTMLDocument.n (https://cdn.jsdelivr.net/npm/bootstrap@latest/dist/js/bootstrap.bundle.min.js:6:4238)
The target is like data-bs-target="#j_id22:exampleModal". This is a common auto generated identifier from JSF where : is used as a seperator.
This code works in 5.3.1 but fails in 5.3.2
Reduced test cases
Working in 5.3.1: https://codepen.io/codylerum/details/OJrjvBx
Failing in 5.3.2: https://codepen.io/codylerum/pen/WNLEzKz
What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
5.3.2
Reactions are currently unavailable