Join GitHub today
Don’t add onclick listener to React root #13778
As part of #11927 we introduced a regression by adding onclick handler to the React root. This causes the whole React tree to flash when tapped on iOS devices (for reasons I outlined in #12989 (comment)).
To fix this, we should only apply onclick listeners to portal roots. I verified that my proposed fix indeed works by checking out our DOM fixtures and adding regression tests.
Strangely, I had to make changes to the DOM fixtures to see the behavior in the first place. This seems to be caused by our normal sites (and
An alternative approach to finding out if we're appending to a React root would be to add a third parameter to
referenced this pull request
Oct 4, 2018
Details of bundled changes.
Only when the React root is smaller than the viewport. In the gif you see the red flashing as long as the text does not cause the viewport to overflow.
This (kinda) explains my strange observations here as well: #12717 (comment)