Closed Bug 987484 Opened 10 years ago Closed 10 years ago

Need a window resize event

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: farooq, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36

Steps to reproduce:

There doesn't seem to be a way for an add-on to get notified when the window gets resized. Please add a window resize event so that add-ons can easily determine when this has taken place.
a use case would be good here to understand the issue. 

if you are already displaying something in the browser, there are DOM resize events you can attach to. if not, what are you trying to do that needs this event?
Flags: needinfo?(farooq)
(In reply to Tomislav Jovanovic [:zombie] from comment #1)
> a use case would be good here to understand the issue. 

I have a browser sidebar, created via sdk/ui/sidebar, and I would like to keep the height of the sidebar content in sync with the height of the browser window content.

> 
> if you are already displaying something in the browser, there are DOM resize
> events you can attach to. if not, what are you trying to do that needs this
> event?

Sorry, I'm not familiar with the DOM resize events you are referring to. Could you please point me at the relevant docs?
Flags: needinfo?(farooq)
https://developer.mozilla.org/en-US/docs/Web/API/Window.onresize

as long as your DOM window is visible (even if inside the sidebar), you should receive this event when the viewport size changes. can you please test that and see if it's enough for you?
Flags: needinfo?(farooq)
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(farooq)
Resolution: --- → INCOMPLETE
Farooq, this bug was closed as "incomplete" because the needed information from you wasn't provided in a reasonable amount of time; so feel free to reopen it, with an explanation about why the DOM window's resize event is not enough for you, so we can have a use case to discuss and maybe implement that feature if it makes sense.
Thanks!
You need to log in before you can comment on or make changes to this bug.