Closed Bug 874488 Opened 11 years ago Closed 6 years ago

Input focused via JS in trusted-ui page sometimes fails to focus causing keyboard not to raise.

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: scolville, Unassigned)

References

Details

In webpay [1] pin entry (trusted-ui) we would like to be able to focus the pin input on each screen that asks for pin input so that the keyboard is available to enter the pin as soon as possible.

On b2g when we call $input.focus() from Jquery, the Jquery focus handler fires but the input doesn't end up focused and the keyboard doesn't appear.

In the code the input is hidden via opacity but I've experimented with removing those styles and it makes no difference wrt the ability to focus the input and see the keyboard reliably.

[1] https://github.com/mozilla/webpay/
Blocks: 863328
Any updates on this?
Looks like calling window.focus() prior to focusing the input in the trusted-ui makes the keyboard appear reliably.
I wonder if this is related to http://bugs.jquery.com/ticket/13363.
(In reply to Mike Taylor [:miketaylr] from comment #3)
> I wonder if this is related to http://bugs.jquery.com/ticket/13363.

Interesting bug. Certainly the scenario in http://bugs.jquery.com/ticket/13363#comment:7 seems to be the same situation.
This is related to focus management in Gaia window mgmt/Gecko.
Component: Gaia::Keyboard → Gaia::System::Window Mgmt
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.