react-component / react-component/trigger

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

未关闭
#97 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
391
派生
245
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先审查 pull request #96,然后使用带有 trigger={['click']} 的 Ant Design Dropdown 和占据页面大部分区域的 iframe 重现该问题。验证点击或轻触 iframe 是否会关闭弹出窗口,与现有的 contextMenu 行为一致。

由索引模型根据 Issue 内容生成。

评估

技术栈
react, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。