You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Clicks on blocked(?)/svg elements do not contain node information #7659
I think if the node is not serialized, we should lookup its parent.
Another aspect of this ticket is that we sometimes are capturing the leaf node which is not necessarily the most user friendly in regards to search for clicks. This could be the difference between target and currentTarget in the click event? This happens with svgs/images.
Hmm, I wonder how we can/should fix this. We could try to walk up from an element to find the closest interactive parent, but IMHO that is probably hard to do, as there may not be one (it is not good practice, but totally valid to do so).
We could try to look up the parents with a custom selector, e.g.
constinteractiveParents='a[href], button, [tabindex]:not([tabindex="-1"])';if(targetNode.__sn.closest(interactiveParents){// use this instead}
but I guess this could also have unexpected side effects 🤔
Activity
mydea commentedon May 2, 2023
Hmm, I wonder how we can/should fix this. We could try to walk up from an element to find the closest interactive parent, but IMHO that is probably hard to do, as there may not be one (it is not good practice, but totally valid to do so).
We could try to look up the parents with a custom selector, e.g.
but I guess this could also have unexpected side effects 🤔