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
I just learned a very important bit of info that could have saved us countless hours of troubleshooting React/Helix compatibility. This is very useful info that would be helpful to have documented in this project somewhere.
React's synthetic events work via single event listener on the document, which means that you can’t stop propagation/event bubbling of a React synthetic event to a Helix web component via the normal method (event.stopPropagation). The bubbling will only be cancelled for any React synthetic events in the chain.
Instead, you have to use event.nativeEvent.stopImmediatePropagation() from within the synthetic event handler, since synthetic event is technically attached to the document, which is always at the end of the event chain.
The text was updated successfully, but these errors were encountered:
I just learned a very important bit of info that could have saved us countless hours of troubleshooting React/Helix compatibility. This is very useful info that would be helpful to have documented in this project somewhere.
React's synthetic events work via single event listener on the document, which means that you can’t stop propagation/event bubbling of a React synthetic event to a Helix web component via the normal method (event.stopPropagation). The bubbling will only be cancelled for any React synthetic events in the chain.
Instead, you have to use
event.nativeEvent.stopImmediatePropagation()
from within the synthetic event handler, since synthetic event is technically attached to the document, which is always at the end of the event chain.The text was updated successfully, but these errors were encountered: