JQuery UI modal dialog uses 100% CPU

青春壹個敷衍的年華 提交于 2019-12-21 04:42:12

问题


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/



来源:https://stackoverflow.com/questions/1479983/jquery-ui-modal-dialog-uses-100-cpu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!