Unable to type with Bluetooth keyboard when action bar is shown

VERIFIED FIXED in Firefox 43



4 years ago
a year ago


(Reporter: kbrosnan, Assigned: jchen)



Firefox 45

Firefox Tracking Flags

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




(1 attachment)



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

no text appears
text appears

Using a Nexus 7 2103 w/ Logitech Tablet Keyboard

Comment 1

4 years ago
[Tracking Requested - why for this release]: complete loss of functionality of bluetooth keyboards in content.
tracking-fennec: --- → ?
status-firefox42: --- → unaffected
status-firefox43: --- → affected
tracking-firefox43: --- → ?
tracking-firefox44: --- → ?
Assignee: nobody → nchen
tracking-fennec: ? → 43+
Tracking since this is a regression.
tracking-firefox43: ? → +
tracking-firefox44: ? → +
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)
Keywords: regressionwindow-wanted
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+
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6a3d50bf4d8e
Keywords: checkin-needed
Blocks: 1197811
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?

Comment 11

3 years ago
Last Resolved: 3 years ago
status-firefox45: --- → fixed
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 15

3 years ago
status-firefox44: affected → fixed
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+

Comment 18

3 years ago
status-firefox43: affected → fixed

Comment 19

3 years ago
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
status-firefox43: fixed → verified
status-firefox44: fixed → verified
status-firefox45: fixed → verified


a year ago
Flags: needinfo?(kbrosnan)
You need to log in before you can comment on or make changes to this bug.