-
Couldn't load subscription status.
- Fork 28
Open
Labels
Description
Heyo,
My preact application uses a shadow dom as a mounting point, and tooltips are not appearing. I did some digging through the source code, and I believe I know why.
// ReactHint#toggleEvents, line 30
;(click || hasEvents) && document[action]('click', this.toggleHint)
;(focus || hasEvents) && document[action]('focusin', this.toggleHint)
;(hover || hasEvents) && document[action]('mouseover', this.toggleHint)
;(click || hover || hasEvents) && document[action]('touchend', this.toggleHint)Events in the shadow dom are not propagated up to document, so toggleHint never fires.
One way that this could be fixed is by allowing users to specify the element where the ReactHint singleton should listen for events