Closed Bug 1523541 Opened 6 years ago Closed 5 years ago

window.innerHeight changes with the dynamic toolbar on Firefox

Categories

(Core :: Layout, enhancement, P3)

65 Branch
Unspecified
Android
enhancement

Tracking

()

RESOLVED FIXED
mozilla73
Webcompat Priority P3
Tracking Status
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox73 --- fixed

People

(Reporter: karlcow, Assigned: hiro)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webcompat] [geckoview:p3])

Attachments

(2 files)

spin off of https://webcompat.com/issues/20655

  1. with Firefox Android
  2. Go to http://mattdavella.com/
  3. scroll

Actual:
when the URL toolbar disappears, the background image stutters.

The reason is that the parallax JavaScript on the site is dependent on the window.innerHeight value.

see the details in https://webcompat.com/issues/20655

On Chrome the value of window.innerHeight doesn't change if the URL bar appears/disappears.

Opening this bug to track if there are other issues of this type for webcompat.
We may decide that it's not a big enough issue.

Flags: webcompat?

I expect this to be fixed by bug 1514429.

Depends on: 1514429

(In reply to Karl Dubost💡 :karlcow from comment #0)

spin off of https://webcompat.com/issues/20655

  1. with Firefox Android
  2. Go to http://mattdavella.com/
  3. scroll

Actual:
when the URL toolbar disappears, the background image stutters.

The reason is that the parallax JavaScript on the site is dependent on the window.innerHeight value.

see the details in https://webcompat.com/issues/20655

On Chrome the value of window.innerHeight doesn't change if the URL bar appears/disappears.

That's probably not because of window.innerHeight. As far as I can tell both of Chrome and Fennec change window.innerHeight when the URL bar is going to be hidden. I've confirmed the value on http://bokand.github.io/demo/urlbarsize.html

I think the issue is caused by the difference of documentElement.clientHeight.

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

Webcompat Priority: ? → P3
Flags: webcompat?

Karl, do you have an archived version of the site in question? The site has been changed since this bug was filed.

Flags: needinfo?(kdubost)

Hiroyuki,

unfortunately, one of these cases, where keeping an archived version would have been good. sorry.

Flags: needinfo?(kdubost)

Never mind, then. (It's not your fault at all.) Hope that this will be fixed by bug 1514429, if it's not, will be fixed by bug 1515980.

Depends on: 1586147

Copying from bug 1552608 comment 57:

Indeed, I may be wrong here. If Chrome's layout view height matches window.innerHeight (I am also saying scale=1 case),

the layout viewport height is excluding the toolbar height in the case where the toolbar is completely shown
the layout viewport height is excluding the toolbar height as if the toolbar is completely shown in the case of the toolbar transition
the layout viewport height is whole visible area's height in the case where the toolbar is hidden

At least for window.innerHeight this is what Chrome does, so it looks the visual viewport height exeeds the layout viewport height during the toolbar transition, but I haven't actually checked.

Whiteboard: [webcompat] → [webcompat] [geckoview:p3]
Blocks: 1515980

I am going to reuse this bug to change window.innerHeight when the dynamic toolbar is completely hidden or starts to be visible, and fire a window resize event at that time.

window.innerHeight on Chrome

  1. is not including the dynamic toolbar height when the dynamic toolbar is visible (regardless of its height)
  2. is including the area which was covered by the dynamic toolbar when the dynamic toolbar is completely hidden
Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED

https://treeherder.mozilla.org/#/jobs?repo=try&revision=79d0f1921372ff0f6eb677402362327996079899

DynamicToolbarTest.kt failed in the try, but it should pass once after bug 1514429 is fixed.

The fix in the try is totally wrong. window.innerHeight should be the layout viewport height.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #11)

The fix in the try is totally wrong. window.innerHeight should be the layout viewport height.

I am going to defer this issue into bug 1598487.

Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87bbf1af61ac
Fire a window resize event at the same time we change position:fixed %-units style values. r=botond
https://hg.mozilla.org/integration/autoland/rev/a10194fbd502
window.innerHeight returns the size for vh units when the dynamic toolbar is completely hidden. r=botond
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Regressions: 1611038
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: