ux
ux copied to clipboard
[LiveComponents] It seems like data-live-id values must not start with a number
This issue occurs starting with UX LiveComponents v2.14.0, prior versions do not have this issue.
When setting data-live-id on a component to a value that starts with a number, this results in:
Uncaught (in promise) DOMException: Element.querySelector: '[data-live-id=4]' is not a valid selector
which occurs in live_controller.js line 2353:
findChildComponentElement(id, element) {
return element.querySelector(`[data-live-id=${id}]`);
}
Just a hunch, but I assume that using data-live-id="${id}" instead might solve this.
You're right.
Now, as data-live-id will be deprecated for id, and the recommendation for id is yet still "ascii-starting-with-a-letter" (ref and description of the potential problems)
i'm not sure we can fix just the 2.14 for that :|