trigger icon indicating copy to clipboard operation
trigger copied to clipboard

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

Open stephen-james opened this issue 7 years ago • 5 comments

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 https://github.com/react-component/trigger/pull/96

stephen-james avatar Aug 13 '18 14:08 stephen-james

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

zxti avatar May 02 '19 18:05 zxti

Is there some reproduce for this?

zombieJ avatar May 03 '19 06:05 zombieJ

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

zxti avatar May 03 '19 06:05 zxti

Got your point. Let me check the PR.

zombieJ avatar May 03 '19 08:05 zombieJ

Anybody knows what are the work arounds for this issue?

wonjunkang avatar Oct 05 '20 20:10 wonjunkang