Closed
Bug 577360
Opened 16 years ago
Closed 16 years ago
document.body.clientWidth changes during onresize event (unmaximize)
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
INVALID
People
(Reporter: thuejk, Unassigned)
References
()
Details
(Whiteboard: qawanted)
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
Build Identifier: Firefox 3.6.6
document.body.clientWidth changes while body.onresize() is running.
Reproducible: Always
Steps to Reproduce:
1. Go to http://thuejk.dk/test.html
2. Maximize window
3. Unmaximize window
Actual Results:
My javascript onresize handler detects that document.body.clientWidth has changed while the handler was running.
Expected Results:
The size of the document body should be finalized before the body onresize handler is run.
Comment 1•16 years ago
|
||
I can't reproduce the problem using either trunk or 3.6.6 on Mac...
| Reporter | ||
Comment 2•16 years ago
|
||
It is probably a timing issue.
I was able to reproduce it on 2 different computers, but the line in the resize handler where document.body.clientWidth changed was not the same.
Comment 3•16 years ago
|
||
That seems fairly unlikely, unless the timing is in when the window manager resizes the window. When you get clientWidth the first time we make sure all the pending changes we control are flushed out....
| Reporter | ||
Comment 4•16 years ago
|
||
E pur si muove!
I tested and reproduced the bug on Linux (Iceweasel 3.5.10) and Windows 3.6.6, btw.
Comment 6•16 years ago
|
||
So when the bug occurs, the red cross doesn't get its position updated when the window gets unmaximized? In that case, I can't reproduce the bug.
Comment 7•16 years ago
|
||
When the bug occurs you get an alert saying "document.body.clientWidth changed from NNN to MMM" where NNN and MMM are some numbers.
Speaking of which... Thue, what numbers do you typically see there?
| Reporter | ||
Comment 8•16 years ago
|
||
Ah bugger. I figured out that it was the scrollbars which disappears once I move the positioned elements inside the frame, which causes clientwidth to update.
Sorry for the false bug report. :(
Comment 9•16 years ago
|
||
Ah, ok. Thanks for sorting that out!
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
| Assignee | ||
Updated•7 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•