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

Popup: closed on trigger blur even when portal content is focused #3005

Closed
vlsergeyatsbt opened this issue Jul 13, 2018 · 3 comments
Closed

Comments

@vlsergeyatsbt
Copy link

vlsergeyatsbt commented Jul 13, 2018

Bug Report

Steps

  • create popup with input as trigger (with on="focus") and second input as popup content
  • click on input to show popup
  • click on input in popup

Expected Result

  • second input focused, popup is still open

Actual Result

  • popup closed

Version

  • works correctly on 0.81.1, 0.81.3
  • does not work correctly on 0.82.0

Testcase

https://codesandbox.io/s/9yv949y13o

@welcome
Copy link

welcome bot commented Jul 13, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@vlsergeyatsbt
Copy link
Author

vlsergeyatsbt commented Jul 13, 2018

I think i've found the source of problem. In version 0.82.0 there is no "rootNode" variable in portal component. Thus the following check always returns undefined:

const didFocusPortal = _.invoke(this, 'rootNode.contains', e.relatedTarget)

i think this check need to rewritten into

const didFocusPortal = _.invoke(this, 'portalNode.contains', e.relatedTarget)

this way it works for 0.82.0

@layershifter layershifter changed the title Popup closed on trigger blur even when portal content is focused Popup: closed on trigger blur even when portal content is focused Jul 13, 2018
@levithomason
Copy link
Member

The proposed bug location appears correct. Want to make a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants