![]() To be more specific on the bug I filed, as it may have some relation to FF’s behavior: one workaround that is sometimes attempted is to have a quickly-executing interval (say, 35ms) which fires “continuously”, starting with the first onresize event, and ending some time (like 500ms) after the “last” onresize event, and accomplishing the same thing, or at least hoping to. I agree it’s quite annoying to not have the ability to rely on this event reliably between browsers. ![]() I sure hope that maybe FF will address it at some point. Still no response from them, several months later. I’ve filed a couple of related bugs about this with Opera before (in fact, I mentioned that the behavior found was similar to that of FF!). ![]() Of course, a bug fix from Firefox and Opera would be much better… ![]() Quite an ugly hack, indeed, but if you think we can handle it better, let me know what you think. The result is not as good as with a simple window.onresize on Safari, for instance, but it is much better in Firefox like this. Yet, this can lead to thousands of unnecessary calls. In fact, I decided to do that because the first thing you do when you are going to resize the window is to point with your mouse at the lower right of the browser window at the same time, we can be sure you won’t resize the window when your mouse is over the window. I found an ugly way to deal with that: I set an window.onmouseout event to a function which will schedule a call for my normal window.onresize event every 20 ms then I set a window.onmouseover event which will clear this job. I just faced this issue a week ago or so, and it is indeed very irritating. 11 Responses to “window.resize firing frequency in browsers” Turns out that Ben was being a good citizen and in going to file a bug, found a couple out there.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |