-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
modal.show() slow forced layout re-flow of large page #41430
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
Comments
I put this in my body's onLoad function and it fixed the issue:
|
Has anyone else experienced this thing or seen it happen before? Is this a duplicate issue |
Hi, would you mind to provide us a reduced test case so we can take a look on that? Thanks! |
Sorry, I have better things to do. However, In the stack overflow link I shared above, the OP explains how to reproduce this issue |
Hello @mshvarts. Bug reports must include a live demo of the issue. Per our contributing guidelines, please create a reduced test case on CodePen or StackBlitz and report back with your link, Bootstrap version, and specific browser and Operating System details. |
Uh oh!
There was an error while loading. Please reload this page.
This line lags the page for like at least 10 seconds because the page contains a long table with many rows and many columns (about a thousand rows)
Here is proof other people had a problem with the code: https://stackoverflow.com/questions/51536468/bootstrap-v4-modalshow-slow-execution
https://github.com/twbs/bootstrap/blob/4c98145482719f5113ca31e389a7be07c5404e13/js/src/util/scrollbar.js#L61C5-L61C44
In any case, it seems setting display to none on the body before setting the overflow to hidden, would fix the issue.
For example:
Let me know if there is a better way!
BTW, the same problem exists for modal.hide() as well. Related Code Here
The text was updated successfully, but these errors were encountered: