Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The resize event isn't a UIEvent #76

Closed
cvrebert opened this issue Mar 10, 2016 · 8 comments
Closed

The resize event isn't a UIEvent #76

cvrebert opened this issue Mar 10, 2016 · 8 comments

Comments

@cvrebert
Copy link
Member

In Safari, Firefox, and Chrome, resize events are instances of Event, not of UIEvent as this spec currently claims. Only MS Edge currently uses UIEvent for resize.

Also, CSSOM View specifies resize as a plain Event. Per https://drafts.csswg.org/cssom-view/#resizing-viewports :

[...] fire an event named resize at the Window object associated with doc

And per https://dom.spec.whatwg.org/#concept-event-fire

To "fire an event named e" means that a new event using the Event interface, [...]

@garykac
Copy link
Member

garykac commented Mar 10, 2016

It seems a bit odd to keep it in UIEvents if it is an instance of Event rather than UIEvent.

But I can't think of another place for it to live. If there are no objections or suggestions for an alternate location, I'll add a section for Event-based UIEvents.

@cvrebert
Copy link
Member Author

Dunno. I suppose it could be moved to CSSOM View like the scroll event was.

@garykac
Copy link
Member

garykac commented Mar 10, 2016

@zcorpan @travisleithead Does moving resize into CSSOM (like we did with scroll) sound reasonable?

@zcorpan
Copy link
Member

zcorpan commented Mar 11, 2016

Yes, it's defined there already and integrates with HTML's event loop, so it should be well-defined when exactly it should be fired, and cover the same ground as the first two paragraphs in UIEvents.

The third paragraph:

The Window object SHOULD always be resizable. 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.

...doesn't really make any sense to me.

@cvrebert
Copy link
Member Author

Only MS Edge currently uses UIEvent for resize.

Filed https://connect.microsoft.com/IE/Feedback/Details/2455552

@plehegar
Copy link
Member

@travisleithead
Copy link
Member

Edge had a pre-existing bug to switch resize to Event from UIEvent, but thanks for the extra feedback :-)

+1 for removing resize from UIEvents spec.

@garykac
Copy link
Member

garykac commented Mar 11, 2016

@zcorpan wrote:

The third paragraph:

The Window object SHOULD always be resizable. 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.

doesn't really make any sense to me.

I read that as: "Windows are resizeable. Other things might be resizeable too, but we don't bother specifying them here."

That text looks like a catch-all to cover the case where some user agents are sending resize on non-Window objects and we didn't want the spec to disallow it. I don't think it adds much value unless we define what other objects can send resize, so I think it's safe to delete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants