You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially, I have a table, and I dynamically create and remove another table through a button click to calculate some values. For that, I have used the getBoundingClientRect() method.
This functionality worked fine in the previous version (4.6.2). However, with the 5.3.2 version, it is causing a performance delay.
<!-- working style sheet --><linkrel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N"
crossorigin="anonymous"
/>
legend {
// Omitted piece of code...
+* {
clear: left; // 2
}
// Omitted piece of code...
}
This line was added as a fix in the following pull request: #30345. It fixes bug/behavior when leading elements after the legend are rendered in one line. Example link could be found in the following comment (after opening scroll it horizontally): #29712 (comment).
But, this bug/behavior is caused by the another pull request: #28917 where the following line of code has been added:
It was added, because when we want to have a border on the fieldset element, it will be rendered not properly. Links with the example in the following comment: #30345 (comment).
So let's recap. The main reason why all of this was added is the presence of a border on the fieldset element. But, the correct rendering of the border could be achieved with the outline property, instead of the border property.
Example link: https://stackblitz.com/edit/js-dydeas?file=index.html.
This approach works well for rendering a border around a fieldset element and also does not have the problem with the leading element next to the legend.
I've already created a pull request for it: #39498.
Since the method proposed above solves the problem of an incorrectly rendered border, I believe that we can safely remove unnecessary lines (which I suggested removing in my pull request). Because the problem described by @rajapandiyan-settu really greatly affects the performance.
Please review this issue and let me know if this proposal is suitable?
P.S. @rajapandiyan-settu
Specific to your situation, you can download already minified bootstrap.min.css file into your project, so that you will use it not from CDN, but directly from your project, and delete unneccessary lines of code specified above.
P.S.2. @julien-deramond I've noticed that you reacted with the 👀 emoji, so maybe this investigation will be helpful for you.
Prerequisites
Describe the issue
Hi,
I am using Bootstrap 5.3.2 in my application.
Initially, I have a table, and I dynamically create and remove another table through a button click to calculate some values. For that, I have used the getBoundingClientRect() method.
This functionality worked fine in the previous version (4.6.2). However, with the 5.3.2 version, it is causing a performance delay.
Reduced test cases
Issue sample: https://stackblitz.com/edit/fvhzg3-9vnksx?file=index.html,index.js
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome
What version of Bootstrap are you using?
v5.3.2
The text was updated successfully, but these errors were encountered: