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
Fails to detect nested text in shadow root of custom component (reddit browse post snippets example) due to event target not matching startNode.parent
#2336
Open
melink14 opened this issue
Dec 20, 2024
· 0 comments
Even after we remove the absolute anchor tag that covers the content, rikaikun doesn't pop anything else due to a check that rp.parentNode === event.target. This seemed to be a check added to tell if the mouse was far from the node but it seems to also trigger in nested cases using shadow root. The event target is always the custom component (on reddit at least)
Clearly, we're not off in nowhere land but I'll need to understand this case in order to not add regressions. That said, given the lack of tests we shouldn't be too careful.
One thing that would make it easier to redo this logic is to fix #30 and removing the guesses as to when we're in a failure state.
The text was updated successfully, but these errors were encountered:
Even after we remove the absolute anchor tag that covers the content, rikaikun doesn't pop anything else due to a check that
rp.parentNode === event.target
. This seemed to be a check added to tell if the mouse was far from the node but it seems to also trigger in nested cases using shadow root. The event target is always the custom component (on reddit at least)rikaikun/extension/rikaicontent.ts
Lines 1231 to 1236 in bb9f6d1
Clearly, we're not off in nowhere land but I'll need to understand this case in order to not add regressions. That said, given the lack of tests we shouldn't be too careful.
One thing that would make it easier to redo this logic is to fix #30 and removing the guesses as to when we're in a failure state.
The text was updated successfully, but these errors were encountered: