Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Popup duplicates when initially opened and page loads directly (Next.js + Framework7-React)

未关闭
#4,338 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
领域
frontend, web-dev

调研方向

从 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
  1. Go to https://f7-popup-test.vercel.app/popup (the popup opens automatically on page load)
  2. Close the popup
  3. 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

贡献指南

打开贡献指南

从这里开始

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

framework7io/framework7 的其他 Issue

查看 framework7io/framework7 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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