Closed
Bug 1147157
Opened 9 years ago
Closed 9 years ago
position:fixed elements break layout on orientation change
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fennec | + | --- |
People
(Reporter: agibson, Assigned: sleroux)
References
()
Details
(Keywords: reproducible)
Attachments
(3 files)
STR: 1.) Visit http://bradfrost.com/demo/fixed/index.html in Firefox for iPhone (portrait orientation) 2.) Observe the demo page uses a simple position:fixed header & footer. 3.) Rotate the device to landscape. Expected results: The fixed header/footer should resize to the width of the viewport on rotation. Actual results: The header/footer do not resize. Note the layout breaks further if you rotate back to portrait again. This does not happen in Safari for iOS.
Comment 1•9 years ago
|
||
Reproducible. The demo seems to adjust correctly as soon as a scroll happens.
tracking-fennec: --- → ?
Keywords: reproducible
Comment 2•9 years ago
|
||
We need to experiment with this more to see what we can do. We'll track for now, and re-evaluate later.
tracking-fennec: ? → +
Updated•9 years ago
|
OS: Mac OS X → iOS 8
Updated•9 years ago
|
Assignee: nobody → sleroux
Assignee | ||
Comment 3•9 years ago
|
||
(Copied from Github) So this is kind of a gross hack but it works. It looks like there's an issue with WKWebView where it doesn't invalidate it's drawing area on orientation change. However, it does invalidate it whenever the content area is scrolled (see https://github.com/WebKit/webkit/blob/master/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm#L1430). I added a small method as an extension to WKWebView that will nudge the content area by a single pixel which forces the content area to invalidate and added this to the traitCollectionChange callback in BrowserViewController.
Attachment #8603549 -
Flags: review?(sarentz)
Attachment #8603549 -
Flags: review?(bnicholson)
Comment 4•9 years ago
|
||
Comment on attachment 8603549 [details] [review] PR Looks good! Left a few more questions/comments in the PR.
Attachment #8603549 -
Flags: review?(bnicholson) → review+
Comment 5•9 years ago
|
||
Comment on attachment 8603549 [details] [review] PR Great! Do you have permissions on Github to merge this?
Attachment #8603549 -
Flags: review?(sarentz) → review+
Assignee | ||
Comment 6•9 years ago
|
||
Yup I do. I'll go ahead and merge it
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•9 years ago
|
||
Added a hotfix that solved a bug which was caused by these changes where the toolbar was not being positioned correctly after enter the tab tray, then the browser view controller, then rotating the de
Assignee | ||
Comment 8•9 years ago
|
||
Bit quick on merging the last patch. This patch includes fixes from wes's comment.
Comment 9•9 years ago
|
||
Also filed https://bugs.webkit.org/show_bug.cgi?id=144913
You need to log in
before you can comment on or make changes to this bug.
Description
•