Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery UI modal dialog uses 100% CPU

When I have a modal JQuery dialog open in IE8, my CPU usage goes to 100% (no, actually 50, but that's 100% of one core). If I break developer tools, it seems that it's a lot of resize events firing (I don't do any volontary resizing). Has someone else encountered this issue and knows how to fix it?

like image 277
erikkallen Avatar asked Sep 25 '09 23:09

erikkallen


2 Answers

The solution is to add this to your CSS file:

.ui-widget-overlay {
   position: fixed;
}

reference

like image 188
erikkallen Avatar answered Dec 04 '22 07:12

erikkallen


I've seen things like this happen when something is filling a container at 100% width and height, and that container has overflow:auto. Which makes it bounce back and forth endlessly trying to fit in the container, but then the container adds or removes scrollbars. Don't know if this is applicable to your situation, but maybe something similar.

like image 39
lod3n Avatar answered Dec 04 '22 06:12

lod3n