Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don’t add onclick listener to React root #13778

Merged
merged 6 commits into from
Oct 9, 2018

Commits on Oct 4, 2018

  1. Don’t add onclick listener to React root

    Fixes facebook#13777
    
    As part of facebook#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 facebook#12989 (comment)).
    
    To fix this, we should only apply onclick listeners to portal roots. I
    verified that this fix indeed worked by checkout out our DOM fixtures
    and added regression tests as well.
    
    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 being
    bigger than the viewport:
    
    ![](http://cl.ly/3f18f8b85e91/Screen%20Recording%202018-10-05%20at%2001.32%20AM.gif)
    
    An alternative fix would be to add a third parameter to
    `appendChildToContainer` based on the tag of the parent fiber. Although
    I think relying on the `_reactRootContainer` property that we set on the
    element is less intrusive.
    philipp-spiess committed Oct 4, 2018
    Configuration menu
    Copy the full SHA
    45578e6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f78da30 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2018

  1. Configuration menu
    Copy the full SHA
    965b17c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f0c2702 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4cf7175 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2018

  1. Configuration menu
    Copy the full SHA
    ea25fe7 View commit details
    Browse the repository at this point in the history