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

BlockUI: rapid blocking-unblocking leads to TypeError this.mask is null #2412

Closed
VsevolodGolovanov opened this issue Nov 10, 2021 · 2 comments · Fixed by #2416
Closed

BlockUI: rapid blocking-unblocking leads to TypeError this.mask is null #2412

VsevolodGolovanov opened this issue Nov 10, 2021 · 2 comments · Fixed by #2416
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@VsevolodGolovanov
Copy link

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)
https://codesandbox.io/s/primereact-blockui-rapid-blocking-unblocking-leads-to-typeerror-this-mask-is-null-d46he

Current behavior
Blocking and unblock rapidly leads to TypeError this.mask is null (Firefox) or TypeError Cannot read properties of null (reading 'addEventListener') (Chrome) in blockui's unblock function.

Expected behavior
No error.

Minimal reproduction of the problem with instructions
Open showcase, click "Block-unblock" button, see error.
This can also be reproduced manually in the BlockUI showcase by rapidly clicking the Block and Unblock buttons repeatedly.

Please tell us about your environment:

  • React version:

  • PrimeReact version:
    6.5.0, 7.0.0

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    Firefox, Chrome

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

@VsevolodGolovanov
Copy link
Author

VsevolodGolovanov commented Nov 10, 2021

I suspect this hinges on animation duration and can be worked around by disabling it.
With 6.5.0 if i style blockui transitionDuration: "0s" then the error goes away, but nothing on the page reacts to clicks after unblocking. The invisible blockui div remains and covers everything.
With 7.0.0 transitionDuration: "0s" has no effect. If i do animation: "none" then it blocks without animation, but never unblocks.
How can I properly disable animation?
I suspect the code is written in such a way that it breaks with zero animation.

@melloware
Copy link
Member

PR submitted.

@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Dec 10, 2021
@mertsincan mertsincan added this to the 8.0.0 milestone Dec 10, 2021
mertsincan added a commit that referenced this issue Dec 10, 2021
@mertsincan mertsincan modified the milestones: 8.0.0, 7.1.0 Dec 13, 2021
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.

3 participants