Closed Bug 1213888 Opened 9 years ago Closed 9 years ago

Unable to type with Bluetooth keyboard when action bar is shown

Categories

(Firefox for Android Graveyard :: Keyboards and IME, defect)

ARM
Android
defect
Not set
normal

Tracking

(firefox42 unaffected, firefox43+ verified, firefox44+ verified, firefox45 verified, b2g-v2.5 fixed, fennec43+)

VERIFIED FIXED
Firefox 45
Tracking Status
firefox42 --- unaffected
firefox43 + verified
firefox44 + verified
firefox45 --- verified
b2g-v2.5 --- fixed
fennec 43+ ---

People

(Reporter: kbrosnan, Assigned: jchen)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

* Attach a bluetooth keyboard to to your device
* Type in a basic text field such as bugzilla or http://pastebin.mozilla.org

Actual:
no text appears
Expected:
text appears

Using a Nexus 7 2103 w/ Logitech Tablet Keyboard
[Tracking Requested - why for this release]: complete loss of functionality of bluetooth keyboards in content.
tracking-fennec: --- → ?
Assignee: nobody → nchen
tracking-fennec: ? → 43+
Tracking since this is a regression.
I attached an Apple keyboard to a Nexus 4 and it worked fine. I do see some focusing issues when the action bar appears (focus moves to the action bar, so keyboard stops working until you refocus the content view).
Regression from 10/31 nightly, range: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7db14bebae9196d780b1d64d2fd32d1bda26828b&tochange=f2518b8a7b97b5bb477e94bc9131584007aac887

Kats, I think bug 1197811 is most relevant. Maybe the fix for that bug changed the way focus is handled? Right now when the action bar is shown during text input, the focus moves away from the layer view, so layer view no longer receives any key events.
Flags: needinfo?(bugmail.mozilla)
Summary: unable to type with bluetooth keyboard in content → Unable to type with Bluetooth keyboard when action bar is shown
That bug didn't explicitly do anything with focus, but it did change the LayerView from being a FrameLayout to a ScrollView with a dummy field at the top (and the content area sitting vertically below it). It could be that the dummy field is getting focus instead of the content area. You could try listening for focus changes on mFillerView and see if it's getting focus in this scenario, or try making it unfocusable somehow to see if that fixes the problem.
Flags: needinfo?(bugmail.mozilla)
Using a hardware keyboard makes Android leave "touch mode", and when
leaving touch mode from a ViewGroup that prefers descendant
focusability, which is what a ScrollView is, Android will shift the
focus to the next available View, and cause our LayerView to lose focus.
The fix is to set the descendant focusability to blocking.
Attachment #8681313 - Flags: review?(bugmail.mozilla)
Comment on attachment 8681313 [details] [diff] [review]
Block LayerView descendants from interfering with focus (v1)

Review of attachment 8681313 [details] [diff] [review]:
-----------------------------------------------------------------

Bit of a rubber-stamp :)
Attachment #8681313 - Flags: review?(bugmail.mozilla) → review+
Comment on attachment 8681313 [details] [diff] [review]
Block LayerView descendants from interfering with focus (v1)

Approval Request Comment

[Feature/regressing bug #]: Bug 1197811

[User impact if declined]: Unable to use hardware keyboards in Fennec under some scenarios

[Describe test coverage new/current, TreeHerder]: Locally

[Risks and why]: Very small; one line patch is very unlikely to have other impact.

[String/UUID change made/needed]: None
Attachment #8681313 - Flags: approval-mozilla-beta?
Attachment #8681313 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/dec44b4525eb
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Comment on attachment 8681313 [details] [diff] [review]
Block LayerView descendants from interfering with focus (v1)

Simple fix, let's take it for Aurora44.
Attachment #8681313 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Kevin, would you be able to confirm that the fix works as expected on a latest Nightly build? Should we consider adding this to our QE sign off test plan done by SoftVision team? Thanks!
Flags: needinfo?(kbrosnan)
Comment on attachment 8681313 [details] [diff] [review]
Block LayerView descendants from interfering with focus (v1)

Taking it in 43 beta 2 too.
Please also land the test.
Attachment #8681313 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Tested on Nexus 9 (Android 6.0) and Apple Wireless Keyboard on https://pastebin.mozilla.org/
On Firefox 43 Beta 1 I was able to reproduce this issue
Verified as fixed on Firefox 43 Beta 2, on latest Aurora and Nightly
Flags: needinfo?(kbrosnan)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: