-
-
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
Button Element not updated if target ID contains colon #22060
Comments
This works
apparently one needs to escape the colons in the data attribute... but then edit jQuery issue?? edit #2: so... apparently jquery needs to "#collapse\:\:Example" and it also appears that it'd be impossible for bootstrap to reliably to the escaping... so looks like data-target="#collapse\:\:Example" is required impossible for bootstrap to do it because it would have no way of knowing if "#some.id" is for |
Hi, in the JSFiddle the data-target ID is already escaped with a single backslash, i.e data-target="#collapse\:Example". This is an already valid jQuery selector. Though why doubling it to "::" ? This does not work for me in the JSFiddle example. Maybe you can provide a running JSFiddle? |
Hi bkdotcom, adding a second double-colon is not a solution. JSF will render the ID attribute like " |
?
? I inspected my fiddle's html and it's
Fiddle has working double-colon Am I missing something? |
Hi bkdotcom, sorry for the messup. I did not mean two subsequent colons but instead a single one. I fixed the heading and description of this issue. However the first JSFiddle still shows the bug. The toggling elements aria attributes are not updated if the ID contains a colon. Cheers. |
Maybe related: I noticed that Scrollspy doesn't work either with anchors/ids that include a colon (e.g. |
I made a Codepen with our latest release (beta 2) see : https://codepen.io/Johann-S/pen/Ebgmgg The only thing we can fix here it's to avoid the thing folks must escape manually their ID |
#24700 is merged so now Bootstrap will escape your ID |
Hm, maybe too late but, here's how I see it:
And here's my conclusions:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors |
Bootstrap Version 4.0.0-alpha.6 and 3.3.7
Target ID = "collapse:Example"
data-target = "data-target="#collapse\:Example""
aria-controls="collapse:Example"
Only the Target attributes get updated, not the button (toggle element) attributes.
IDs with a colon exist especially in the JSF world.
Bug JS Fiddle
Related Bug
The text was updated successfully, but these errors were encountered: