[fix bug 948057] (B2G Browser) Zooming in on modal window causes graphical issues #1729

Merged
merged 1 commit into from Feb 24, 2014

Projects

None yet

2 participants

@alexgibson
Member

Firefox OS performs a layout/reflow on position:fixed elements when the user pinch/zooms. This affects Mozilla.Modal, resulting in layout issues and odd glitches.

This PR switches to using position: absolute for small viewports, which does not exhibit the same behavior and performs more predictably.

I've tested this change on a GeeksPhone Peak device.

@jpetto
Member
jpetto commented Feb 24, 2014

Only case I could find here that this wouldn't fix is if there's a modal created with allowScroll: true. Zooming on a modal without the noscroll class applied would have the same layout issues.

I'm wondering if mozilla-modal.js should override allowScroll on small viewports, forcing it to be false if the screen size is less than our tablet breakpoint. Could maybe use the var isSmallViewport = $w.width() < 760; line from the /firefox/partners/ page?

@alexgibson
Member

Could maybe use the var isSmallViewport = $w.width() < 760; line from the /firefox/partners/ page?

Good suggestion, I'll see to adding it.

@alexgibson
Member

PR updated!

@jpetto
Member
jpetto commented Feb 24, 2014

Looks good! r+ 🔍

@jpetto jpetto merged commit 95e62bb into mozilla:master Feb 24, 2014

1 check passed

default Jenkins build 'bedrock_github' #3303 has succeeded
Details
@alexgibson alexgibson deleted the alexgibson:bug-948057-btg-zooming-on-modal-window-causes-graphical-issues branch May 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment