Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#4,338 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Bắt đầu với bản tái hiện được liên kết tại f7-popup-test.vercel.app/popup và kiểm tra lần render ban đầu của trang popup với opened={true}. Tái hiện sự cố bằng cách tải trang và đóng popup, sau đó truy tìm lý do nhiều instance xuất hiện. Hoàn tất khi một popup được mở trực tiếp chỉ render một lần và đóng lại mà không để lại bản trùng lặp trong DOM.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

  • 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

Ngôn ngữ chính
JavaScript
Star
18.8k
Fork
3.2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của framework7io/framework7

Tất cả issue của framework7io/framework7

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.