Closed Bug 1138635 Opened 5 years ago Closed 4 years ago

Keep keyboard up after voice input

Categories

(Firefox for Android :: General, defect)

x86
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed
firefox42 --- verified

People

(Reporter: antlam, Assigned: karim)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Current:
---
 - After voice input, words are all selected with keyboard down
 - User has to tap URL bar again to bring up keyboard and "->" button

Proposed:
---
 - Keep keyboard up, words are NOT all selected, cursor at the end
 - user can tap "->" to submit search

Since voice dictation is still not perfect, a possible usability improvement would be leaving the keyboard up and allowing users to add to what they've dictated. This also has the added benefit of having a way to "submit" what they've dictated easily.
Flags: needinfo?(jhugman)
QA Contact: flaviu.cos
I agree about wanting to keep the keyboard visible. Chrome does this too, and I tried to get that working [1] but failed.

After using the voice search a bit, I (and Martyn) was not happy with the "append" nature of putting the cursor at the end of the text. Selecting the text made it easier to replace incorrect recognitions, and tapping at the end of the text was easier for switching to "append" mode.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=778588#c28
I had wondered about the keyboard (no alternative Go button). Thanks for the feedback. 

Also: the replace v append. Had wondered about that; good to know real usage (even tiny sample size) has informed this.
Flags: needinfo?(jhugman)
Assignee: nobody → kbenhmida
Karim, to summarize, this bug is for making sure the keyboard is raised after voice recognition finishes.

You can try showing the keyboard when the search bar gets filled using InputMethodManager ( http://developer.android.com/reference/android/view/inputmethod/InputMethodManager.html#showSoftInput%28android.view.View,%20int,%20android.os.ResultReceiver%29 ) or you could see if you can set an android property in the urlbar EditText so that it brings up the keyboard whenever it's focused (I'm not sure this would work, but it's certainly cleaner!).
Summary: Keep keyboard up, and move cursor to end of line after voice input → Keep keyboard up after voice input
Here's the link to a build with the keyboard changes: https://www.dropbox.com/s/r5uy28an8dt026t/fennec-41.0a1.en-US.android-arm.apk
Attached file MozReview Request: bz://1138635/karim (obsolete) —
/r/9307 - Bug 1138635 - Keep keyboard up after voice input. r=liuche

Pull down this commit:

hg pull -r 99279f1d0b3e5ca4097656883bc2942c5a7a7384 https://reviewboard-hg.mozilla.org/gecko/
Comment on attachment 8609646 [details]
MozReview Request: bz://1138635/karim

/r/9307 - Bug 1138635 - Keep keyboard up after voice input. r=liuche

Pull down this commit:

hg pull -r 99279f1d0b3e5ca4097656883bc2942c5a7a7384 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8609646 - Flags: review?(liuche)
(In reply to Karim Benhmida (:karim) from comment #4)
> Here's the link to a build with the keyboard changes:
> https://www.dropbox.com/s/r5uy28an8dt026t/fennec-41.0a1.en-US.android-arm.apk

Looks good! thanks Karim
I just noticed something though, maybe try to reproduce it to make sure it's not just me? FWIW, current Nightly doesn't do this.

STR:
 1) Use Voice input
 2) While keyboard is active and up, press 'Recents'
 3) Keyboard stays up but 'Recents is also visible behind it.

Expected result: Keyboard hides like Nightly does.

Actual: Keyboard stays up until user presses "back".

Nexus 6 device.
Flags: needinfo?(kbenhmida)
https://reviewboard.mozilla.org/r/9307/#review8015

::: mobile/android/base/toolbar/ToolbarEditText.java:535
(Diff revision 1)
> +                InputMethodManager imm =

Nit: final :)

::: mobile/android/base/toolbar/ToolbarEditText.java:537
(Diff revision 1)
> +                imm.showSoftInput(ToolbarEditText.this, InputMethodManager.SHOW_IMPLICIT);

Hm, I think this isn't the most recent patch. I think we messed something up trying to switch you over to commit-based workflow :/
It looks like the patch you pushed before is here though - https://reviewboard.mozilla.org/r/9285/ .
Attachment #8609646 - Flags: review?(liuche)
Comment on attachment 8609646 [details]
MozReview Request: bz://1138635/karim

/r/9307 - Bug 1138635 - Keep keyboard up after voice input. r=liuche

Pull down this commit:

hg pull -r 2eab0249bc77fd0ec21a947beb67b7c2e70a6fab https://reviewboard-hg.mozilla.org/gecko/
Attachment #8609646 - Flags: review?(liuche)
(In reply to Anthony Lam (:antlam) from comment #8)
> I just noticed something though, maybe try to reproduce it to make sure it's
> not just me? FWIW, current Nightly doesn't do this.
> 
> STR:
>  1) Use Voice input
>  2) While keyboard is active and up, press 'Recents'
>  3) Keyboard stays up but 'Recents is also visible behind it.
> 
> Expected result: Keyboard hides like Nightly does.
> 
> Actual: Keyboard stays up until user presses "back".
> 
> Nexus 6 device.


I solved it in this build: https://www.dropbox.com/s/r5uy28an8dt026t/fennec-41.0a1.en-US.android-arm.apk?dl=0

Tell me if you still have the problem.
Flags: needinfo?(kbenhmida) → needinfo?(alam)
Comment on attachment 8609646 [details]
MozReview Request: bz://1138635/karim

https://reviewboard.mozilla.org/r/9305/#review8021

This works for me, and doesn't have the issue that antlam saw with the voice recognition staying up when Recents is brought up. This doesn't *bring* the keyboard up, but keeps it up if you already have it open.
Attachment #8609646 - Flags: review?(liuche) → review+
(In reply to Karim Benhmida (:karim) from comment #12)
> (In reply to Anthony Lam (:antlam) from comment #8)
> > I just noticed something though, maybe try to reproduce it to make sure it's
> > not just me? FWIW, current Nightly doesn't do this.
> > 
> > STR:
> >  1) Use Voice input
> >  2) While keyboard is active and up, press 'Recents'
> >  3) Keyboard stays up but 'Recents is also visible behind it.
> > 
> > Expected result: Keyboard hides like Nightly does.
> > 
> > Actual: Keyboard stays up until user presses "back".
> > 
> > Nexus 6 device.
> 
> 
> I solved it in this build:
> https://www.dropbox.com/s/r5uy28an8dt026t/fennec-41.0a1.en-US.android-arm.
> apk?dl=0
> 
> Tell me if you still have the problem.

Alright! Thanks Karim - I'll trust you here :)
Flags: needinfo?(alam)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/974036be05fa
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Attachment #8609646 - Attachment is obsolete: true
Attachment #8619637 - Flags: review+
Verified as fixed in build 42.0a1 2015-07-16;
Device: Motorola Razr (Android 4.4.4).
You need to log in before you can comment on or make changes to this bug.