Interesting, but only Keyboard app knows its actual height, and as far as we're introducing 3 party keyboard, there may be a 'fullscreen' keyboard implementation.
I am not sure if media query could cover the use case without fail. You don't want to use media query to record each keyboard app height in your app, right? So far an app window height is affected by: 1. Keyboard height (?) 2. Statusbar height (2rem to 4rem now) 3. Wrapper footer(the navigation UI) height (1rem to 5 or 6rem now) 4. Fullscreen state 5. Orientation state I am uncertain if we could judge 'now keyboard is there' from some math statement in media query. However it's a good idea to have: @media (-moz-keyboard) If we could have that! Julien Wajsberg <[email protected]> 於 2013/8/12 下午5:33 寫道: > Tell me if I'm saying something wrong here, but can't we use media > queries too ? I know we don't use them so often for height changes ;) > but this sounds like a good use case to me here. > > Le 09/08/2013 09:08, Alive a écrit : >> There would be some timing difference (mainly from keyboard overlay >> transition) between >> 'focus' and 'resize' event. >> So 'resize' is the correctly event to go. >> >> The process is: >> User app focuses the input field >> -> Keyboard app gets focus event via Keyboard API >> -> Keyboard app updates its url with hash >> -> Keyboard manager in System app is notified via mozbrowserlocationchange >> event >> -> Keyboard manager performs the opening transition of keyboard overlay >> -> In the end of the opening transition, keyboard manager notifies window >> manager with 'keyboardshow' event >> -> Window Manager in System app invokes 'current' app's |appWindow.resize()| >> method. >> -> appWindow calculates the height and adjust the size of the container, the >> iframe in the container is then resized >> -> Use app gets resize event. >> >> Yuan Xulei(袁徐磊) <[email protected]> 於 2013/8/9 上午4:08 寫道: >> >>> Hi, >>> There is no special event for keyboard opening, but the keyboard opens >>> after receiving the focus event of current input field. >>> So you may listen to that event instead. >>> >>> Yuan >>> On 08/09/2013 03:52 AM, [email protected] wrote: >>>> Does anyone know if in Firefox OS, When keyboard opens, I have an event >>>> for that & if so, which is it? >>>> >>>> I need to modify my screen on keyboard opening event. Viewport getting >>>> shrinked and I need to control the UI on this event. >>>> >>>> Thank you. >>>> _______________________________________________ >>>> dev-b2g mailing list >>>> [email protected] >>>> https://lists.mozilla.org/listinfo/dev-b2g >>> _______________________________________________ >>> dev-b2g mailing list >>> [email protected] >>> https://lists.mozilla.org/listinfo/dev-b2g >> -- >> Alive C. Kuo, Front-end Engineer, FirefoxOS, MoCo. Taiwan, Taipei office. >> [email protected] >> >> >> >> >> _______________________________________________ >> dev-b2g mailing list >> [email protected] >> https://lists.mozilla.org/listinfo/dev-b2g > > -- Alive C. Kuo, Front-end Engineer, FirefoxOS, MoCo. Taiwan, Taipei office. [email protected] _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
