JQuery UI modal dialog uses 100% CPU

2019-03-28 05:28发布

问题:

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?

回答1:

The solution is to add this to your CSS file:

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

reference



回答2:

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.



回答3:

I had a similar issue, IE was firing the windowResize event many times per second and maxing out the client CPU. The fix detailed here worked perfectly: http://www.frebsite.nl/projects/windowresizefix/