Closed Bug 1222889 Opened 5 years ago Closed 5 years ago

Address bar mode auto-complete does not highlight the auto-complete word so cursor ends up in middle of a word

Categories

(Firefox for Android Graveyard :: General, defect)

43 Branch
defect
Not set
normal

Tracking

(firefox48 fixed, fennec48+)

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- fixed
fennec 48+ ---

People

(Reporter: donrhummy, Assigned: jchen)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Android 6.0; Tablet; rv:43.0) Gecko/43.0 Firefox/43.0
Build ID: 20151103024436

Steps to reproduce:

1. opened incognito mode
2. started typing an address in the address bar


Actual results:

Firefox auto-completed the word but left the cursor where it was and didn't highlight the added text so while trying to type "movies", after previously visiting "mma" outside of incognito mode, ends up with:

reddit.com/r/moviesma

that's because the moment i type "m", it appends "ma" but leaves the cursor before the "ma" AND doesn't highlight the "ma".


Expected results:

the appended text should have been highlighted. This but only occurs in incognito mode
I can reproduce this behavior in normal browsing mode as well.
Status: UNCONFIRMED → NEW
tracking-fennec: --- → ?
Ever confirmed: true
Summary: Address bar in incognito mode auto-complete does not highlight the auto-complete word so cursor ends up in middle of a word → Address bar mode auto-complete does not highlight the auto-complete word so cursor ends up in middle of a word
I'm seeing this as well on Nightly.

Here are reliable STR:

1) Start typing in urlbar, see autocomplete
2) Move cursor to the end of the domain
3) Backspace to delete entire domain
4) Start typing again

Let's get a regression range.
Flags: needinfo?(kbrosnan)
I can reproduce this even on Fiefox 39.0:
Type "su" and "pport.mozilla.org" was introduced in the URL Bar, highlighted.
Delete using backspace. 
Type "a" and "bout:firefox" is introduced in the URL Bar, but not highlighted.
Assignee: nobody → margaret.leibovic
tracking-fennec: ? → 47+
Flags: needinfo?(kbrosnan)
jchen, I started looking into this and I think I might be in a bit over my head... would you mind taking over this bug?
Flags: needinfo?(nchen)
I could not reproduce it on my devices, and I'm not sure I have the cycles for it. Feel free to ask me about the code though!
Flags: needinfo?(nchen)
(In reply to Jim Chen [:jchen] [:darchons] from comment #5)
> I could not reproduce it on my devices, and I'm not sure I have the cycles
> for it. Feel free to ask me about the code though!

Which devices were you testing? I saw this on a Nexus 5X running 6.0.2. I also know Kannan reported seeing this.

If this is a device-specific issue, that lends another layer of complexity.
Flags: needinfo?(nchen)
I'm seeing this on an Android Nexus 5X running 6.0.1

I think I was seeing it previously on my old Moto G2 as well, which was running some Android 5 variant.
(In reply to :Margaret Leibovic from comment #6)
> (In reply to Jim Chen [:jchen] [:darchons] from comment #5)
> > I could not reproduce it on my devices, and I'm not sure I have the cycles
> > for it. Feel free to ask me about the code though!
> 
> Which devices were you testing? I saw this on a Nexus 5X running 6.0.2. I
> also know Kannan reported seeing this.
> 
> If this is a device-specific issue, that lends another layer of complexity.

I used a Nexus 4 running 4.4.2, so maybe it depends on the Android version.
Flags: needinfo?(nchen)
Honestly, I'm not going to have time to dig into this. It's a crappy bug, but I'm less worried if it doesn't happen on all devices.

jchen, I think you're best qualified to actually fix this, do you have other devices you can test on?
Assignee: margaret.leibovic → nobody
tracking-fennec: 47+ → ?
Flags: needinfo?(nchen)
(In reply to :Margaret Leibovic from comment #9)
> Honestly, I'm not going to have time to dig into this. It's a **** bug,
> but I'm less worried if it doesn't happen on all devices.
> 
> jchen, I think you're best qualified to actually fix this, do you have other
> devices you can test on?

It happens on all Android devices 5.0 and above which is 39% of all Android devices. That's a LOT.
Got a device now.
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Flags: needinfo?(nchen)
Duplicate of this bug: 1258889
tracking-fennec: ? → 48+
Adding the auto-completion text in the URL bar triggers selection change
notifications on Android 5.0 and above. That led us to think the user
changed the selection, and in turn commit the auto-completion. This
patch makes us ignore this edge case and preserve the auto-completion.
Attachment #8737821 - Flags: review?(margaret.leibovic)
Comment on attachment 8737821 [details] [diff] [review]
Ignore selection change notifications when auto-completing (v1)

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

Nice catch, thanks for investigating.
Attachment #8737821 - Flags: review?(margaret.leibovic) → review+
https://hg.mozilla.org/mozilla-central/rev/496db28e275d
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.