Closed Bug 959049 Opened 7 years ago Closed 7 years ago

[keyboard refactor] support landscape mode


(Firefox OS Graveyard :: Gaia::Keyboard, defect)

Not set


(Not tracked)



(Reporter: djf, Assigned: djf)




(1 file)

46 bytes, text/x-github-pull-request
: review+
Details | Review
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.

This patch is mostly CSS, but also has some related JavaScript changes, including one that resizes cached page layouts on demand rather than resizing them all on every orientation change.

If you don't have time to review please forward to Jan.

Casey: do we have an actual visual spec for landscape mode of the keyboard?  Could you take a look at the demo keyboard with this patch applied?  (Note though that I want to just go ahead and land this if it gets r+, and do visual fixes in a followup.)
Attachment #8365623 - Flags: review?(timdream)
Flags: needinfo?(kyee)
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:
Closed: 7 years ago
Resolution: --- → FIXED
Assignee: nobody → dflanagan
Flags: needinfo?(
You need to log in before you can comment on or make changes to this bug.