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

fix(Portal): ignore document click if no node or portal #823

Merged
merged 3 commits into from
Nov 10, 2016

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Nov 10, 2016

This PR makes a few fixes to the Portal, including one that should fix the IE Modal issue:

  1. ignore document click if not mounted and open, fixes IE Modal error #750
  2. consolidates if (this.state.open) checks to the renderPortal() method, instead of checking every time renderPortal() is called.
  3. remove portal event handlers before adding duplicates in renderPortal(), this should fix a memory leak

@levithomason
Copy link
Member Author

@jcarbo sanity check?

@codecov-io
Copy link

Current coverage is 100% (diff: 100%)

Merging #823 into master will not change coverage

@@           master   #823   diff @@
====================================
  Files         136    136          
  Lines        2217   2220     +3   
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
+ Hits         2217   2220     +3   
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update 5ddcee2...d4367a1

@jeffcarbs
Copy link
Member

LGTM 👍

@levithomason levithomason merged commit 9b6e3c2 into master Nov 10, 2016
@levithomason levithomason deleted the fix/portal-events branch November 10, 2016 16:17
@levithomason
Copy link
Member Author

Released in [email protected]

layershifter pushed a commit that referenced this pull request Nov 11, 2016
* refactor(Portal): consolidate !open checks in renderPortal

* fix(portal): clean up event handlers when re-rendering

* fix(Portal): ignore document click if no node or portal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IE Modal error
3 participants