Closed Bug 959049 Opened 7 years ago Closed 7 years ago
[keyboard refactor] support landscape mode
The current system keyboard reduces the height of each of the keyboard rows in landscape mode. The new keyboard needs to do this as well, because it currently hardly allows enough room for content when it is displayed in landscape.
Attachment #8365623 - Flags: review?(timdream)
Tim: this is an overnight airplane patch. Hopefully it doesn't show, but you've been warned :-)
Comment on attachment 8365623 [details] [review] link to patch on github It looks like you are simply copying the approach of the current keyboard (having a basic CSS and overwrite/manually calculate some of the values in JS). A better approach would be either have the layout entirely controlled by JS, or CSS, but I will take anything is that is not worse than we have right now.
Attachment #8365623 - Flags: review?(timdream) → review+
You're right. This is just copying the current approach. I would prefer to do it all with media queries and have a complete layout for each form factor and orientation. But as far as I know we don't have a complete visual design for anything other than portait mode on a phone. So I'm going with the existing hack for landscape. When I did this patch I was on a plane and couldn't remember the name of the new 'vh' CSS unit. I thought it was 'hx' and that it was unsupported in Gecko. But now that I look it up and see it is vh, I think it is supported. If it works, I'll use that to replace the JS that sets the rem height differently in landscape and portait mode.
I've updated the pull request as described above. We still use JS for positioning the alternative characters menu, but JS no longer needs to know anything about how the CSS file defines rems.
Landed to master: https://github.com/mozilla-b2g/gaia/commit/cfeb5bf7e7665e4be412d1f774bd46fadeff3c93
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Backed out my patch because it introduced lint: https://github.com/mozilla-b2g/gaia/commit/a346ccfe3ebde118edd27a73fdc96804f032775b
Relanded with lint fixed: https://github.com/mozilla-b2g/gaia/commit/d512930951c026bb0c6910f8f272cd79d797e8f7
You need to log in before you can comment on or make changes to this bug.