Last Comment Bug 697773 - Cannot type in AwesomeBar URL bar with hard keyboard
: Cannot type in AwesomeBar URL bar with hard keyboard
Status: VERIFIED FIXED
[HKB][testday-20111111]
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All Android
: P1 normal (vote)
: ---
Assigned To: Alex Pakhotin (:alexp)
:
: Sebastian Kaspari (:sebastian)
Mentors:
: 700731 (view as bug list)
Depends on: 701021 701136 702995
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-27 11:49 PDT by Brian Nicholson (:bnicholson)
Modified: 2016-07-29 14:20 PDT (History)
14 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
11+


Attachments
Fix (2.48 KB, patch)
2011-11-08 18:05 PST, Alex Pakhotin (:alexp)
blassey.bugs: review+
Details | Diff | Splinter Review
Fix v2 (1.56 KB, patch)
2011-11-11 00:23 PST, Alex Pakhotin (:alexp)
blassey.bugs: review+
Details | Diff | Splinter Review
Cannot type in AwesomeBar URL bar with hard keyboard. (1.41 KB, patch)
2011-11-14 10:59 PST, James Willcox (:snorp) (jwillcox@mozilla.com)
no flags Details | Diff | Splinter Review

Description Brian Nicholson (:bnicholson) 2011-10-27 11:49:26 PDT
Trying to type in the AwesomeBar with the Droid Pro (with hard keyboard) doesn't work.  The URL bar simply loses focus when a character is pressed.
Comment 1 Joel Maher ( :jmaher) 2011-10-28 08:08:58 PDT
I am running into this while trying to use monkey runner
Comment 2 Lucas Rocha (:lucasr) 2011-10-28 08:15:23 PDT
Brian, could you try latest birch and tell me if this still happens. I've just pushed a focus-related fix (bug 697121) which might be related to this bug. Can you see where the focus goes once the URL text entry loses focus?
Comment 3 Naoki Hirata :nhirata (please use needinfo instead of cc) 2011-10-28 08:31:06 PDT
WFM on droid pro with latest nightly birch.
Comment 4 Brian Nicholson (:bnicholson) 2011-10-28 11:06:49 PDT
Yes, I'm still seeing this bug. I don't know where the focus goes - it doesn't look like anything has focus.
Comment 5 Brian Nicholson (:bnicholson) 2011-10-28 11:20:04 PDT
After installing a soft keyboard and setting "Input method" to the soft keyboard in the Android settings, the hard keyboard works.
Comment 6 Naoki Hirata :nhirata (please use needinfo instead of cc) 2011-10-28 12:03:45 PDT
I noticed that I used the simeji IME on the Droid Pro and that's why it worked.

On the Droid 2 with the default IME (Multi-touch Keyboard), the hardware keyboard did not work.
Comment 7 Naoki Hirata :nhirata (please use needinfo instead of cc) 2011-10-28 15:39:04 PDT
I just realized, given bug 698131; the focus is on the first line of the list.  The first item is highlighted because it's all white.
Comment 8 Joel Maher ( :jmaher) 2011-10-28 18:17:30 PDT
using the latest build from birch, I am unable to get this to work :(
Comment 9 Aaron Train [:aaronmt] 2011-11-01 06:50:23 PDT
Seeing as how this renders the browser completely useless without the ability to invoke a virtual keyboard on such a device (and probably dozens akin), this should have a high priority.
Comment 10 Ian Melven :imelven 2011-11-02 09:14:21 PDT
i just experienced this on birch nightly from this morning on my G2, the soft keyboard works fine but i can't type in the URL bar with the physical keyboard. basically commenting to say G2 has the same problem. the focus drops down to the first entry under "All Pages" (it's highlighted).
Comment 11 Aaron Train [:aaronmt] 2011-11-08 11:16:53 PST
*** Bug 700731 has been marked as a duplicate of this bug. ***
Comment 12 Alex Pakhotin (:alexp) 2011-11-08 11:21:28 PST
Confirmed with Motorola Droid 3.
Now I've got a phone with keyboard and I'm working on this.
Comment 13 Alex Pakhotin (:alexp) 2011-11-08 18:05:19 PST
Created attachment 573054 [details] [diff] [review]
Fix

The TabHost somehow steals the focus from the edit box on keyboard input.
The fix is to explicitly request the focus when the awesome screen opens and when the edit box is touched.
Comment 14 Alex Pakhotin (:alexp) 2011-11-08 19:33:51 PST
http://hg.mozilla.org/projects/birch/rev/fce63dd03ad3
Comment 15 Mark Finkle (:mfinkle) (use needinfo?) 2011-11-08 19:36:03 PST
Just adding Sriram and Lucas to CC in case something in the Awesombar.java or AwesombarTabs.java is doing the focus thing on purpose.

We do things like http://hg.mozilla.org/projects/birch/rev/365da62068e0
and: http://mxr.mozilla.org/projects-central/source/birch/embedding/android/AwesomeBar.java#107

I just want to make sure we aren't fighting code we added on purpose. If we are, we need to make sure we aren't cancelling anything out.
Comment 16 Alex Pakhotin (:alexp) 2011-11-08 19:41:05 PST
In this case the stealing of the focus happened before any AwesomeBar listeners got called, which made the bug especially difficult to understand.
Comment 17 Alex Pakhotin (:alexp) 2011-11-08 20:58:44 PST
By the way, I should have mentioned: this bug was not really a regression, but rather an unexpected side-effect of a new feature added in the bug 695307, specifically - the AwesomeBarTabs. JFYI.
Comment 18 Lucas Rocha (:lucasr) 2011-11-09 02:18:54 PST
(In reply to Alex Pakhotin (:alexp) from comment #17)
> By the way, I should have mentioned: this bug was not really a regression,
> but rather an unexpected side-effect of a new feature added in the bug
> 695307, specifically - the AwesomeBarTabs. JFYI.

Just make sure soft keyboard is hidden when switching tabs or whenever the text entry loses focus.
Comment 19 Aaron Train [:aaronmt] 2011-11-09 07:30:46 PST
20111109040505
http://hg.mozilla.org/projects/birch/rev/edd8921d5bb8
Motorola Droid Pro (Android 2.3)

Filed bug 701018 as another issue with the Motorola Droid Pro
Comment 20 Aaron Train [:aaronmt] 2011-11-09 07:47:57 PST
This busted accessing virtual keyboard on landscape: bug 701021, touch input bug 701020, and maybe bug 701018.
Comment 21 Lucas Rocha (:lucasr) 2011-11-09 07:51:30 PST
I suggest to back out this patch until there's a clean fix for this bug.
Comment 22 Brad Lassey [:blassey] (use needinfo?) 2011-11-09 08:20:06 PST
why did you reopen this bug? The patch fixed the bug in question. Do not reopen unless there's been a back out
Comment 23 Alex Pakhotin (:alexp) 2011-11-09 09:04:20 PST
The patch does fix the bug as described, but unfortunately does break the touch mode. :( I tested the basic things with VKB and it seemed to work, but apparently not in all cases.

The problem here is with TabHost, which our AwesomeBarTabs is based on. It steals the focus when it shouldn't. It's actually a known issue: http://code.google.com/p/android/issues/detail?id=2516
I used the workaround mentioned there, but apparently it has too many bad side-effects.
Comment 24 Alex Pakhotin (:alexp) 2011-11-09 10:29:19 PST
Backed out due to VKB regressions. Need another solution.
Comment 25 Alex Pakhotin (:alexp) 2011-11-11 00:23:33 PST
Created attachment 573761 [details] [diff] [review]
Fix v2

OK, this looks like the real fix. The hardware keyboard works, and I don't see any of those issues appeared after the first version.
Comment 26 Martijn Wargers [:mwargers] (not working for Mozilla) 2011-11-11 02:59:05 PST
I guess this is also the reason that it is impossible to use the vkb or the normal keyboard in native Fennec on the Android emulator?
Comment 27 John Hammink 2011-11-11 15:07:39 PST
I'm able to confirm this case on 20111111 nightly for testday.

Motorola Droid Pro, Android 2.2
Comment 28 Christian Holler (:decoder) 2011-11-12 04:19:35 PST
(In reply to Martijn Wargers [:mw22] (QA - IRC nick: mw22) from comment #26)
> I guess this is also the reason that it is impossible to use the vkb or the
> normal keyboard in native Fennec on the Android emulator?

I do have the same issue on the emulator. Very likely related to this problem here, as the symptoms are exactly the same as with android on tegra with USB hardware keyboard attached.
Comment 29 Alex Pakhotin (:alexp) 2011-11-14 10:55:08 PST
http://hg.mozilla.org/projects/birch/rev/2f8943cd9e17
Comment 30 James Willcox (:snorp) (jwillcox@mozilla.com) 2011-11-14 10:59:09 PST
Created attachment 574348 [details] [diff] [review]
Cannot type in AwesomeBar URL bar with hard keyboard.
Comment 31 James Willcox (:snorp) (jwillcox@mozilla.com) 2011-11-14 10:59:44 PST
Comment on attachment 574348 [details] [diff] [review]
Cannot type in AwesomeBar URL bar with hard keyboard.

bzexport fail
Comment 32 Aaron Train [:aaronmt] 2011-11-15 07:24:18 PST
20111115055623
http://hg.mozilla.org/projects/birch/rev/6b776bed41d7
Motorola Droid Pro (Android 2.3)
Comment 33 Ian Melven :imelven 2011-11-15 15:40:42 PST
this works on my Android 2.3 G2 in today's nightly as well :)

Note You need to log in before you can comment on or make changes to this bug.