Closed Bug 132364 Opened 24 years ago Closed 2 years ago

window.innerHeight is not ready when you open sidebar tab in the first time.

Categories

(Core :: DOM: CSS Object Model, defect, P5)

x86
All
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mgalli, Unassigned)

References

()

Details

I realized this one in an XPI Sidebar tab project that I am working. But also happens with HTML based Sidebar tabs. I tested with : -------------- Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020311 Here is the scenario of the problem: ------------------------------------ If you have a sidebar tab (HTML for example), the window.innerHeight property has a wrong value (not the window.innerHeight expected). This happens for whatever new window you open (where the sidebar tab is the default tab). To workaround and see the expected result, you have to switch to other tab, then back to the previous one. To test the testtab, click in the above URL and click in the livepreview icon, then add the tab to your Sidebar.
Additional comments: Note that the Sidebar Tab is a simple alert(window.innerHeight). Adding roger@livesidebar.com to the cc and vidur.
-> DOM
Assignee: sgehani → jst
Component: Sidebar → DOM Level 0
QA Contact: sujay → desale
Johnny and V, For some special lobbists of the Sidebar Tab World, this is really a blocker. Roger Soares (cced here) is the principal for LiveSidebar.com. From the experience there, it's clear that the use of window.innerHeight and window.innerWidth (after onload event) is a great feature! allowing Sidebar Tabs to be adjusted to the available size of the screen. I hope that this case is not a complex bug. I also verified the same bug when creating a XUL based (XPI) Sidebar tab that is using one IFRAME that includes JS code to evaluate the window.innerHeight / Width properties.
If this is something that you think needs to be fixed for mozilla1.0, then please nominate it (add the mozilla1.0 keyword) and we'll have a look, but no promises.
Mass-reassigning bugs to dom_bugs@netscape.com
Assignee: jst → dom_bugs
Is this bug still active? I went to the provided URL, then clicked the clickable "Live Preview" image with the caption "Test your livepreview page here:" it created a popup which had an iframe <IFRAME height="271" id="previewIframe" name="previewIframe" src="http://www.livesidebar.com/lsblabs/other/bugzilla/height-test.html" width="162"> and that iframe when loaded launched an alert saying 271. I even measured the iframe viewport and it was 270ish. I tried the same steps with Firefox 0.9 build 200406014 rv:1.7 and got the same results. WORKSFORME Mozilla 1.8a2 build 2004061308 under XP Pro SP1a here.
Sorry for my last comment: I misunderstood in what the bug consisted of. I added the http://www.livesidebar.com/lsblabs/other/bugzilla/height-test.html into my sidebar by clicking on the Add to your sidebar image and when opening for the first time that innerHeight test tab, then I get the faulty 0 value for innerHeight. When I switch to another tab and then come back to that innerHeight test tab, I do get the correct innerHeight value. So I see the problem now. Sorry for that.
Assignee: general → nobody
QA Contact: desale → general
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
Component: DOM: Core & HTML → DOM: CSS Object Model
Severity: normal → S3

XPCOM add-ons are dead and webextension sidebar code probably doesn't have this issue at this point.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.