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

'click' Trigger doesn't hide pop up when user clicks on an iframe in the page #97

Open
stephen-james opened this issue Aug 13, 2018 · 5 comments

Comments

@stephen-james
Copy link

stephen-james commented Aug 13, 2018

Behaviour:
When using rc-trigger (eg. via Ant Design's Dropdown) with a click type of trigger, the popup will not be closed if a user clicks or taps on an iframe in the page.

Expected Behaviour:
When a user clicks or taps anywhere on the document or an iframe within the document, the popup will be closed. This works fine for contextMenu types of triggers.

Steps to Reproduce:
(Using Ant Design Dropdown)

  • Render a view that contains a Dropdown (with trigger={['click']}) and an iframe that takes up a large part of the screen
  • Open the Dropdown overlay (popup) by clicking on the Dropdown
  • Click on the iFrame
  • Outcome: the Dropdown popup will not close

I have submitted a PR to help with fixing this #96

@zxti
Copy link

zxti commented May 2, 2019

@yiminghe @zombieJ Would you please consider merging @stephen-james's fix for this bug? Thank you.

@zombieJ
Copy link
Member

zombieJ commented May 3, 2019

Is there some reproduce for this?

@zxti
Copy link

zxti commented May 3, 2019

@zombieJ https://codesandbox.io/s/43kl961v4w - click on the link and then click on the iframe.

@zombieJ
Copy link
Member

zombieJ commented May 3, 2019

Got your point. Let me check the PR.

@wonjunkang
Copy link

Anybody knows what are the work arounds for this issue?

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

No branches or pull requests

4 participants