Open Bug 701648 Opened 10 years ago Updated 4 years ago

Onresize event should fire on CSS-enabled resize

Categories

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

7 Branch
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: bugzilla, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238

Steps to reproduce:

This might be a WONTFIX, but I think it's worth mentioning. There seems no simple way at the moment to detect CSS-only resizes with JavaScript: http://stackoverflow.com/q/8082729/113195.

Assume you bind a handler to the onresize event on an element node, which has the CSS resize property set to, say, "both".


Actual results:

At the moment nothing happens, when the user resizes the element.


Expected results:

Resizing the element should fire the onresize event analogue to the window case.
That's by design, the site isn't informed about any changed done by the user. The thinking is so it can't circumvent the users actions.

I personally agree that this, is a bit silly as the site can completely disable this feature...
Well, exactly. A simple

    element.style.resize = 'none';

would also take the "resizing power" from the user. This is not like ':visited' but a CSS solution designed to replace the common JS pattern. However, it is unusable for JS-heavy interfaces, if you can't react to resizes.

(Is there any standardization work in progress in this area? CSSWG, DOM, anyone?)
DOM3 Events isn't exactly conclusive as to whether it should be fired for elements:
"A host language may define certain elements to be resizable, and under what conditions (e.g., specific elements like iframe, or elements with particular characteristics like width and height); however, this specification does not define the behavior for elements."
However, it would be immensely useful for authors, and implementing it doesn't violate any spec.

Testcase: http://dabblet.com/result/gist/1498895
Severity: normal → enhancement
Component: General → DOM: Events
OS: Linux → All
Product: Firefox → Core
Hardware: x86 → All
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
You need to log in before you can comment on or make changes to this bug.