Open benrbray opened 4 years ago
In case anyone is still facing this problem, this happens because the onFocusIn
event is not retargeted. It needs to be handled in the same way as onFocusOut
.
In case anyone is still facing this problem, this happens because the
onFocusIn
event is not retargeted. It needs to be handled in the same way asonFocusOut
.
what's the way that handled onFocusOut
? I am trying to fix onFocus issue as well.
I want to use React inside the Shadow DOM of a web component. I'm calling
retargetEvents
on the shadow root, but unfortunately theonFocus
event still isn't working as expected. However, other events likeonClick
are working just fine. Minimal working example below. (Using TypeScript 3.8.3, React 16.13, Parcel 1.12.4, react-shadow-dom-retarget-events 1.0.11).Expected Behavior: When receiving focus, both text inputs should print a message to the console.
Actual Behavior: Only the input NOT inside a web component correctly prints the message. The input inside the web component does not print a message on focus.
Minimal Working Example:
TSX:
HTML: