Closed Bug 888076 Opened 11 years ago Closed 11 years ago

[keyboard] need a mozKeyboard method to re-focus the keyboard

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: djf, Assigned: xyuan)

Details

When the user is switching keyboard layouts and switches to a layout that uses a different input method than the current layout we don't have any way to initialize the new input method. We need a way to use the mozKeyboard API to request that we be sent the current state of the input field, just as if the user had just focused the input field for the first time. Currently, most layouts use the Latin input method. But we do have a couple of keyboard layouts (Arabic, Hebrew) that do not use it. So curretnly, if the user switches from English to or from Arabic, the best we can do is to hide the keyboard after the switch and force the user to refocus the input field to resume input. I don't think any of our 1.0.1 or 1.1 builds will ship to markets that use non-latin keyboards, so this isn't an urgent bug, but it would still be really nice to fix. Maybe navigator.mozKeyboard.refocus() is what we need? A method to behave exactly as if the user had just tapped in the input field.
Yuan: would this be a good bug for you?
Flags: needinfo?(xyuan)
Yes, it is good bug for me. But I think `refocus` is kind of hacking. Sometimes we may need to keep the keyboard state after switching keyboard. `refocus` will force the keyboard to reset its state. What is the specific information needed after the user switches to other IMEs? Will it be enough to provide methods to retrieve the selection range and text content of the input field? I pefer to the methods of retrieving the current state of the input field rather than `refocus`.
Assignee: nobody → xyuan
Flags: needinfo?(xyuan)
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
The new keyboard API should cover the requirement.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.