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

Open
#97 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

Research direction

Review pull request #96 first, then reproduce the issue using an Ant Design Dropdown with trigger={['click']} and an iframe occupying much of the page. Verify that clicking or tapping the iframe closes the popup, matching the existing contextMenu behavior.

Written by the indexing model from the issue text.

Description

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

Dominant language
TypeScript
Stars
391
Forks
245
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-component/trigger

All issues in react-component/trigger

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.