Closed
Bug 686885
Opened 13 years ago
Closed 13 years ago
window.onresize only fires once until page refereshed
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: hkessock, Unassigned)
Details
Attachments
(1 file)
262 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) Gecko/20100101 Firefox/7.0 Build ID: 20110908135051 Steps to reproduce: OSX, 10.6.8, Firefox 7 Beta (latest as of 9/15/2011) - Create a web page with javascript that assigns an event handler for the window 'resize' event. Actual results: The very first time I resize the window the event fires as expected (fired once after mouse stopped moving.) All subsequent resizing of the window results in zero event firings. This was validated by testing with the MDN resize event sample after thoroughly examining my code. Expected results: Each time the window was resized the resize event should have fired.
Please attach a simple HTML test file (use the "Add an attachment" link above). Thanks!
Reporter | ||
Comment 2•13 years ago
|
||
Attachment #560361 -
Attachment mime type: text/plain → text/html
Updated•13 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 4•13 years ago
|
||
(In reply to Justin Dolske [:Dolske] from comment #3) > > *** This bug has been marked as a duplicate of bug 626963 *** I'm sorry but I don't see how this is a duplicate of a bug where rendering stops when you alert in a resize event listener. That is not the behavior I am reporting as a bug. The bug I have is that Firefox only fires one resize event on the window irrespective of how many times you resize the window. In other words, if I resize the window once I get the expected result of a resize event being generated. If I resize it again, the event doesn't get generated. Rendering hasn't change, javascript just doesn't get a resize event.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Note that the testcase doesn't work at all on Windows XP, it hangs my browser. Duping against bug 626963 might be reasonable, because onresize seems fundamentally broken with variations in different OSes.
Product: Firefox → Core
QA Contact: general → general
Version: 7 Branch → Trunk
Reporter | ||
Comment 6•13 years ago
|
||
(In reply to j.j. from comment #5) > Note that the testcase doesn't work at all on Windows XP, it hangs my > browser. > Duping against bug 626963 might be reasonable, because onresize seems > fundamentally broken with variations in different OSes. I think it is important that it stand alone. If you're on XP, change the alert in the sample to something else like console.log( "resized" );... Otherwise the hang bug will likely get fixed but the single firing of the event most likely will not. They *may* be related to the same fix, but it seems highly unlikely. Just my $0.02
Comment 7•13 years ago
|
||
If I use console.log there, and not an alert, I see hundreds of calls to the console.log call as I drag-resize the window, as expected. So as far as I can tell, this bug worksforme. At least on nightly builds.
Reporter | ||
Comment 8•13 years ago
|
||
That's what I would expect to see, but do not. I just get one... Oh how I wish I could get more :). I'm on OSX 10.6.8 using 7.0 latest beta release.
Comment 9•13 years ago
|
||
> That's what I would expect to see, but do not. I just get one...
How are you determining that? Note that the console will coalesce identical messages and show how many of that message it got as a little white number in a red circle. You can work around that like so if desired:
var foo = 0;
function resize() {
console.log("resize event detected: " + (++foo));
}
and if I do that I get lots of messages.
Reporter | ||
Comment 10•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #9) > > That's what I would expect to see, but do not. I just get one... > > How are you determining that? Note that the console will coalesce identical > messages and show how many of that message it got as a little white number > in a red circle. You can work around that like so if desired: > > var foo = 0; > function resize() { > console.log("resize event detected: " + (++foo)); > } > > and if I do that I get lots of messages. Holy crikey I am a giant Firefox Web Console moron. Apologies for totally wasting everyone's time. Works fine if I observe the little red counter going apesh** crazy while I resize. Boris thanks for not assuming I wasn't an idiot. :)
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•