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: Mask is not applied when blocked changes rapidly #11838
Comments
I have a quick working workaround for the issue. This is my monkey patching code. To work include it before first use of BlockUI (ex. ngOnInit in AppComponent): let originalBlock = BlockUI.prototype.block;
BlockUI.prototype.block = function() {
if (this._blocked && this.animationEndListener) {
this.unbindAnimationEndListener();
DomHandler.removeClass(this.mask.nativeElement, 'p-component-overlay-leave')
}
originalBlock.apply(this);
} |
Hi, So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Best Regards, |
Problem still persists as of version 14.2.2. EDIT: I am afraid i cannot reopen the issue. Shall I create new issuie instead? |
fixed #11838 - refactor unblock method conditional in blockui
Describe the bug
Issue occurs when block panel input blocked changes from false to true while css transition is still being applied. Issue replication in attached stackblitz.
Expected result:
Whole document is under mask after 20 ms, since blocked variable is true
Observed result:
No mask is being shown
Environment
Package versions:
"primeflex": "^3.2.1",
"primeicons": "^5.0.0",
"primeng": "^14.0.1",
Reproducer
https://stackblitz.com/edit/github-7bew7n?file=src/app/app.component.ts
Angular version
14.1.1
PrimeNG version
14.0.1
Build / Runtime
Angular CLI App
Language
ALL
Node version (for AoT issues node --version)
16.14.0
Browser(s)
Edge 104.0.1293.54
Steps to reproduce the behavior
Expected behavior
Mask should be visible (blocked variable is true).
You can see it is correlated with transitions since changing numeric values for settimeout to: 1000 and 2000 makes issue go away.
The text was updated successfully, but these errors were encountered: