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

hacks.mozilla.org - Scrollable code blocks change height and page layout jumps, when opening/hiding navigation bar #27820

Closed
nyanpasu64 opened this issue Mar 15, 2019 · 9 comments
Labels
browser-firefox-mobile priority-important severity-important A non-core broken piece of functionality, not behaving the way you would expect. type-viewport
Milestone

Comments

@nyanpasu64
Copy link

URL: https://hacks.mozilla.org/2019/03/fast-bump-allocated-virtual-doms-with-rust-and-wasm/

Browser / Version: Firefox Mobile 65.0
Operating System: Android 7.0
Tested Another Browser: Yes

Problem type: Design is broken
Description: Scrollable code blocks change height and page layout jumps, when opening/hiding navigation bar
Steps to Reproduce:

  • Scroll down to "Incrementing counter example with Dodrio" code block, or below
  • scroll up and down to show and hide the address bar
  • the code block size changes when address bar opens and closes
  • all of the page below moves up and down.
    issue is similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1277712
Browser Configuration
  • None

Reported by @jimbo1qaz

From webcompat.com with ❤️

@webcompat-bot webcompat-bot added this to the needstriage milestone Mar 15, 2019
@softvision-sergiulogigan softvision-sergiulogigan changed the title hacks.mozilla.org - design is broken hacks.mozilla.org - Scrollable code blocks change height and page layout jumps, when opening/hiding navigation bar Mar 29, 2019
@softvision-sergiulogigan softvision-sergiulogigan added the severity-important A non-core broken piece of functionality, not behaving the way you would expect. label Mar 29, 2019
@softvision-sergiulogigan

Thanks @jimbo1qaz for this reported issue!

I can reproduce it on one of my test devices:
Samsung Galaxy S6 (Android 7.0) - 1440 x 2560 pixels (~577 ppi pixel density)

The issue is not reproducible on:
OnePlus 6 (Android 9) - 1080 x 2280 pixels, 19:9 ratio (~402 ppi pixel density)

Moving to needsdiagnosis.

@nyanpasu64
Copy link
Author

I think the code blocks resize themselves to around viewport height (even on desktop when resizing the browser window). For some reason, Firefox Android's window height changes when its top bar expands/collapses.

@karlcow karlcow self-assigned this Apr 8, 2019
@karlcow
Copy link
Member

karlcow commented Apr 8, 2019

The height of the code block is set as

.article pre {
	word-wrap: break-word;
	font-size: 1rem;
	max-height: 75vh;
	overflow: auto;
	padding: 0.5em;
}

so this change when the height changes indeed due to the scrollbar.
And this is probably related to

@theres-waldo another issue with viewport, url bar, and height specified in vh.

@theres-waldo
Copy link

Making vh units independent of URL bar transitions will be tracked in bug 1515980 (or a dependency of it). For now, I added this issue to the "See Also" list of that bug.

(Note: unlike window.innerWidth/innerHeight, vh units will not change to track the layout viewport size. They will change to track the visual viewport size with the URL bar hidden. See this document for details.)

@karlcow
Copy link
Member

karlcow commented Apr 9, 2019

Thanks.

@nyanpasu64
Copy link
Author

nyanpasu64 commented Apr 9, 2019

Should I avoid reporting bugs caused by known Firefox viewport issues?

@theres-waldo
Copy link

Should I avoid reporting bugs caused by known Firefox viewport issues?

I think it's helpful to still report them, for two reasons:

  1. The volume of webcompat issues associated with a Firefox bug can help us assess a bug's priority.
  2. After fixing the Firefox bug, we can re-test the associated webcompat issues and make sure they're really all fixed. In the event that one of them just seemed like the same issue but actually wasn't (which can sometimes happen), we don't lose track of it.

@karlcow
Copy link
Member

karlcow commented Apr 10, 2019

@jimbo1qaz it's very useful. I closed it as a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1515980

Once it is fixed we can trace back to here and test again and sees if we had made the right assumption. If not we will reopen.

So yes, please keep them coming.

@lock
Copy link

lock bot commented Apr 17, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue at https://webcompat.com/issues/new if you are experiencing a similar problem.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 17, 2019
@karlcow karlcow removed their assignment Apr 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser-firefox-mobile priority-important severity-important A non-core broken piece of functionality, not behaving the way you would expect. type-viewport
Projects
None yet
Development

No branches or pull requests

5 participants