Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollPanel: Null Reference Error in iOS Safari/WKWebView #7489

Closed
madalina-agh opened this issue Dec 9, 2024 · 1 comment · Fixed by #7532
Closed

ScrollPanel: Null Reference Error in iOS Safari/WKWebView #7489

madalina-agh opened this issue Dec 9, 2024 · 1 comment · Fixed by #7532
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@madalina-agh
Copy link

Describe the bug

Environment:

  • Next.js PWA
  • Mobile Safari/WKWebView browser
  • Route change scenario (specifically during rapid logout)

Error Details:

  • TypeError: null is not an object (evaluating 'I.current.scrollWidth')
  • Occurs when ScrollPanel is quickly removed from DOM during route change

Potential Cause:
Incomplete unmounting or cleanup processes might be leaving unresolved references to the ScrollPanel component.

Proposed Solution:
Implement null checks in the ScrollPanel component to prevent null reference errors during rapid DOM manipulations.

Additional Notes:
Error has only been observed in iOS Safari/WKWebView environment.

image

Reproducer

No response

System Information

System:
    OS: iOS 18.1.1
Browsers:
    Safari/WKWebView
npmPackages:
    primereact: ^10.8.5 => 10.8.5 
    react: ^18.3.1 => 18.3.1 
    tailwindcss: ^3.4.13 => 3.4.13

Steps to reproduce the behavior

  1. Run Next.js PWA with ScrollPanel components in iOS Safari/WKWebView
  2. Trigger rapid route change (e.g., immediate logout)
  3. Observe TypeError in console

Expected behavior

No response

@madalina-agh madalina-agh added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 9, 2024
melloware added a commit to melloware/primereact that referenced this issue Dec 30, 2024
@melloware melloware self-assigned this Dec 30, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 30, 2024
@melloware melloware added this to the 10.8.6 milestone Dec 30, 2024
@melloware
Copy link
Member

Thanks for the detailed report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants