Open Bug 645649 Opened 13 years ago Updated 2 years ago

onresize event is not sent anymore if window is smaller than approx 317px

Categories

(Firefox :: General, defect)

x86
All
defect

Tracking

()

People

(Reporter: cjolif, Unassigned)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0

When I resize horizontally my windows to a size less than around 300px, the onresize even is not sent anymore.

Reproducible: Always

Steps to Reproduce:
1. run:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>Test onresize</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<body onresize="console.log('got a resize '+window.innerWidth)">
	</body>
</html>
2. resize horizontally to a small size
3. look a the console, below 300px, no event is sent
Actual Results:  
No resize happens below around 300px

Expected Results:  
resize event should still be fired

The event was still fired in FF 3.6 below that limit.
Confirmed at 280 pixels for Fx4//Windows 7.
OS: Windows XP → All
Also if relevant, max width is 1366 pixels for me.
For ff4 and linux, I managed 1px with firebug console and with web console included in firefox.

About the maximum it seems it is going to infinity, I have stopped it at ~5100px
Attached file testcase
I changed your testcase a little, so there is no need for a console being open, although i kept the console logging, just in case one is open.

Steps To Reproduce:
1.Open the testcase
2.Horizontally resize the window

Actual Results: 
2.The resize stops fireing at 269 for Firefox 4.0 and at 242 for Firefox 3.6.12

Expected Results:
2.The resize stops fireing when the window can not be resized anymore
Status: UNCONFIRMED → NEW
Ever confirmed: true
When I run the attachment from the link https://bug645649.bugzilla.mozilla.org/attachment.cgi?id=522341 it stops also on some px
When I copy the source code to a local file and test it, it gives me the size 1px.

What I have noticed at the first test (testing with the attachment) is that the minimum depends on the size of navigation toolbar (address bar). So if you remove some buttons (like home button or an addon button) you can see the minimum changes but not going to 1px like in the second test.

So, I confirm that something is going wrong.
For me the event stops at the same point as bug 428939 occurs - unsurprisingly.

[...and just spotted bug 428939 comment #42]
Component: General → Event Handling
Keywords: regression, testcase
Product: Firefox → Core
QA Contact: general → events
Version: unspecified → Trunk
So something in the Firefox UI limits the min-size?
Component: Event Handling → General
Product: Core → Firefox
QA Contact: events → general
Indeed.  That's exactly what comment 5 is saying.  We don't make the web page smaller than the UI, and if the UI has a minimum width the web page will simply not shrink below that (and overflow the window).  So no onresize events, since the content area is not resizing.

This is trivial to test by putting a div with a border and auto width in the document and seeing whether you can see its right border at all times.  I expect that once onresize stops firing you can't.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: