Open Bug 1005947 Opened 10 years ago Updated 2 years ago

onresize event is fired twice

Categories

(Core :: DOM: Events, defect, P5)

29 Branch
x86
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: hiremathprashants, Unassigned)

Details

Attachments

(1 file)

Attached file onResize.html
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140421221237

Steps to reproduce:

I have registered onresize event on body tag, whenever i resize(maximize/RestoreDown) the browser window onresize event should be fired.


Actual results:

onresize event is fired, but rather than firing only once it is fired twice whenever i maximize or Restore Down my browser window. So 
1) on Restore Down Browser Window : onresize event is fired twice.
2) on maximise Browser Window : onresize event is fired twice.



Expected results:

onresize event should have been fired only once i.e once for Restore Down Browser window and once for Maximise Brower window.

Chrome Browser behaves normally and fires event only once.
Component: General → DOM: Events
What are the window sizes (innerWidth/innerHeight) you see before you maximize and during the two event firings?
Hi Boris, 

window size before I maximize are :

innerWidth:1066 innerHeight:551

When i maximize window in both the events I'm getting same innerWidth and innerHeight i.e

innerWidht:1440 innerHeight:789
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5

I just tried in Chrome on macOS and I get two events too.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: