Popup duplicates when initially opened and page loads directly (Next.js + Framework7-React)
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- javascript, next.js, react
调研方向
从 f7-popup-test.vercel.app/popup 中链接的复现开始,检查 opened={true} 时 popup 页面的初始渲染。通过加载页面并关闭 popup 来复现问题,然后追踪为什么会出现多个实例。完成标准是:直接打开的 popup 只渲染一次,并且关闭时不会在 DOM 中留下重复项。
由索引模型根据 Issue 内容生成。
描述
- Framework7 version: 8.3.4
- Framework7-React version: 8.3.4
- React version: 19.0.0
- Next.js version: 15.1.7
- Platform and Target: Web / Chrome / Vercel
- Live Link or CodeSandbox: https://f7-popup-test.vercel.app/popup
Describe the bug
When the page loads with a popup initially open (opened={true}), multiple popup instances are created.
After closing the popup, another duplicate popup remains visible meaning more than one instance of the same popup exists in the DOM.
Why popup is open by default and why this is needed?
because the popup is controlled through URL query parameters or hash (for example, when a user directly opens a URL like ?popup=open or #popup that should display the popup on load).
To Reproduce
- Go to https://f7-popup-test.vercel.app/popup (the popup opens automatically on page load)
- Close the popup
- Notice that another popup instance remains open, duplicated on initial render
Expected behavior
Only a single popup instance should exist.
If the popup starts open (opened={true}), it should open once and close normally without leaving duplicates.
Actual Behavior
When the popup starts open on page load, multiple popup instances are rendered.
After closing one, another duplicate popup stays open.
Additional context
This is a minimal reproduction built with Next.js 15.1.7 and Framework7-React 8.3.4:
Repository: https://github.com/khaledsAlshibani/f7-popup-test
- 主要语言
- JavaScript
- 星标
- 18.8k
- 派生
- 3.2k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
framework7io/framework7 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
framework7io/framework7#4365 · 1 条评论 ·
-
propsHistory 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
framework7io/framework7#4347 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 64/100
framework7io/framework7#4222 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
framework7io/framework7#4175 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
framework7io/framework7#3969 · 3 条评论 ·
查看 framework7io/framework7 的全部 Issue
相似的 Issue
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
难度 2/5 1-3 小时 新手友好度 86/100
NousResearch/hermes-agent#122386 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
-
security
难度 2/5 1-3 小时 新手友好度 72/100
IBM/node-sdk-core#373 ·
-
docs web/
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 65/100