Closed Bug 1610685 Opened 6 years ago Closed 3 years ago

[Unity desktop] Pressing alt+enter in the url bar ignores autofilled value

Categories

(Core :: Widget: Gtk, defect)

73 Branch
Unspecified
Linux
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox-esr68 --- unaffected
firefox72 --- unaffected
firefox73 --- wontfix
firefox74 --- fix-optional
firefox75 --- fix-optional
firefox117 --- verified
firefox118 --- verified
firefox119 --- verified

People

(Reporter: sbrl, Unassigned)

References

(Regression)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

  1. Navigate to any page.
  2. Start typing a URL until you get an auto-filled suggestion (e.g. if I had previously visited reddit.com, then if I type redd it will auto-fill the rest of the URL
  3. Press Alt + Enter
  4. See bug (notice also that it deletes the suggestion as soon as I press alt and before I press enter).

Actual results:

I end up doing a search in a new tab for "redd".

Note that if you type in something that looks like a url (e.g. something.somethingelse) and press the down arrow key to select a search instead (I use DuckDuckGo) and then hit Alt + Enter, a similar issue occurs. It navigates to something.somethingelse in a new tab instead of doing a search.

Expected results:

It should have taken the suggestion and navigated to "reddit.com" in a new tab.

Someone on reddit suggested I should use the mozregression tool to identify when the bug started happening. The output of that was as follows:

Last good revision: bc0035aa57fe3dbd8b827661e30cf9744af6fc47
First bad revision: 7c234b6314b33cdce86cb5d94ece642e1836783b
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=bc0035aa57fe3dbd8b827661e30cf9744af6fc47&tochange=7c234b6314b33cdce86cb5d94ece642e1836783b

I'm on Ubuntu 19.10 with the Unity 7.5 desktop.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Address Bar
Has Regression Range: --- → yes
Has STR: --- → yes
Regressed by: 1593964
Keywords: regression
Priority: -- → P2
Priority: P2 → --

I can't reproduce on Windows, it always opens reddit for me.

I also can't reproduce with Option+Enter on macOS.

Hi Drew — Can you have someone look into this? Is megabar on in 73? Perhaps this is a regression with megabar off?

Flags: needinfo?(adw)

I don't think megabar on/off matters, I can't reproduce on Windows even with the megabar off, I'm testing 73.0 b8.
I just also tested the latest beta code on Ubuntu 18.04.3 LTS and I can't reproduce.
Maybe it's a specific problem with Ubuntu 19, or the STR are not complete.

OS: Unspecified → Linux

(In reply to Starbeamrainbowlabs from comment #0)

  1. See bug (notice also that it deletes the suggestion as soon as I press alt and before I press enter).

Which suggestion is deleted? Can you be more specific about this? It's possible the system is handling ALT in some special way and changing the selection?
Also, are you using the RIGHT or LEFT alt on your keyboard?

Flags: needinfo?(sbrl)

Hey! Thanks for looking into it.

:mak - If I have been to reddit.com before, then as I type in the box redd it will autocomplete and put in it.com highlighted. As soon as I press the left alt button on my keyboard, it the it.com suggestion disappears.

I recorded a video to fully demonstrate what is happening: https://www.youtube.com/watch?v=HKX9mzvYuFQ&feature=youtu.be

Additional system information:

  • uname -a: Linux MACHINE_NAME_HERE 5.3.0-26-generic #28-Ubuntu SMP Wed Dec 18 05:37:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • lshw: https://pastebin.com/sKztkcT2
  • dpkg -l | awk '{ print $2 }': https://pastebin.com/v1RQ4kt2
  • Desktop environment: Unity 7.5 with deb http://ppa.launchpad.net/unity7maintainers/unity7-desktop/ubuntu eoan main (note that this is NOT the default Gnome desktop environment) with X11
Flags: needinfo?(sbrl)

(In reply to Starbeamrainbowlabs from comment #7)

:mak - If I have been to reddit.com before, then as I type in the box redd it will autocomplete and put in it.com highlighted. As soon as I press the left alt button on my keyboard, it the it.com suggestion disappears.

Ok this is not expected at all and not something Firefox would do, I suspect it's Unity, or some specific option of it. Firefox is mostly optimized for the default gtk Ubuntu environment and we saw various bugs around with different environment. Maybe you can find which option of Unity is doing special handling with ALT.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(adw)
Priority: -- → P5

(In reply to Marco Bonardo [:mak] from comment #8)

(In reply to Starbeamrainbowlabs from comment #7)

:mak - If I have been to reddit.com before, then as I type in the box redd it will autocomplete and put in it.com highlighted. As soon as I press the left alt button on my keyboard, it the it.com suggestion disappears.

Ok this is not expected at all and not something Firefox would do, I suspect it's Unity, or some specific option of it. Firefox is mostly optimized for the default gtk Ubuntu environment and we saw various bugs around with different environment. Maybe you can find which option of Unity is doing special handling with ALT.

Ah, good to know that it's not intended behaviour.

In the Unity desktop, if you single press ALT on it's own and left the ALT key, then it comes up with a search box that lets you search the current application's menus. This is the closest I can think of, but the bug in Firefox happens on the key press, not key release, as the Unity 7.5 function I've described works.

In addition, as I described above in the initial report I ran mozregressions to identify the commits that introduced the bug. Looking closer, I'm particularly suspicious of this commit: https://hg.mozilla.org/integration/autoland/rev/520b534bb5434f22bd25e3f3074dae532378ea85

Oh yeah, and this is all with a completely clean profile. I did this to test it in the video:

mkdir /tmp/x
firefox --profile /tmp/x

(In reply to Starbeamrainbowlabs from comment #9)

In addition, as I described above in the initial report I ran mozregressions to identify the commits that introduced the bug. Looking closer, I'm particularly suspicious of this commit: https://hg.mozilla.org/integration/autoland/rev/520b534bb5434f22bd25e3f3074dae532378ea85

Could you please post the actual result of mozregression?

I wonder if it's possible that pressing ALT is playing with the input field focus, that looks like plausible based on your suspect, maybe ALT keydown for some reason is removing and setting back focus on the input field. That may explain the problem, though it should not really do that, and it's unlikely to be a Firefox bug.

(In reply to Marco Bonardo [:mak] from comment #12)

I wonder if it's possible that pressing ALT is playing with the input field focus, that looks like plausible based on your suspect, maybe ALT keydown for some reason is removing and setting back focus on the input field. That may explain the problem, though it should not really do that, and it's unlikely to be a Firefox bug.

Yeah, this comes from Unity desktop:

(In reply to Starbeamrainbowlabs from comment #9)

In the Unity desktop, if you single press ALT on it's own and left the ALT key, then it comes up with a search box that lets you search the current application's menus. This is the closest I can think of, but the bug in Firefox happens on the key press, not key release, as the Unity 7.5 function I've described works.

I think we should wontfix this since Unity as we knew it is more or less dead. Unity 7.5 is from May 2016. UBports has taken over development from Canonical but it's not clear to me that Unity will ever gain traction again.

Summary: Pressing alt+enter in the url bar ignores suggestions → [Unity desktop] Pressing alt+enter in the url bar ignores suggestions
Summary: [Unity desktop] Pressing alt+enter in the url bar ignores suggestions → [Unity desktop] Pressing alt+enter in the url bar ignores autofilled value

:mak - The last few lines from my first mozregression run are in the initial report, but I did it again and recorded the entire thing with asciinema: https://asciinema.org/a/295631

I wonder if it's possible that pressing ALT is playing with the input field focus, that looks like plausible based on your suspect, maybe ALT keydown for some reason is removing and setting back focus on the input field. That may explain the problem, though it should not really do that, and it's unlikely to be a Firefox bug.

How can it not be a bug in Firefox, when by using mozregressions I have clearly identified that 3 specific changesets (that seem to be a group) to Firefox are responsible. I'm confused.

From the above recording, here's the final pushlog link: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a3473bbf2b429bab91756a80c6f2c48f8f008b8c&tochange=7c234b6314b33cdce86cb5d94ece642e1836783b

Can anyone test this on Ubuntu 19.10 with the Gnome desktop to confirm?

The only reason I'm still using Unity is because I really can't get on with the new GNOME desktop at all. - and none of the alternativess I've tried work for me either.

(In reply to Starbeamrainbowlabs from comment #14)

How can it not be a bug in Firefox, when by using mozregressions I have clearly identified that 3 specific changesets (that seem to be a group) to Firefox are responsible. I'm confused.

Because it's an unexpected behavior by the window manager to play with focus like that, indeed none of the tier1 platforms (included Gnome on Ubuntu 18) do that. It used to work because some code was wallpapering the problem, but that code was not intended to work like that. In practice it was working by luck. That's not technically a bug, it's an unsupported behavior.

Due to reasource management, fixing it or not really depends on how much widespread the problem is, for now we just know it's happening with Unity, whose development stopped, so it can't be an high priority when we have many other bugs affecting a large percentage of users. We'd probably accept a patch from the community if it looks safe.

Can anyone test this on Ubuntu 19.10 with the Gnome desktop to confirm?

I don't have Ubuntu 19.10 around, so far I confirmed there's no problem on Ubuntu 18. Obviosuly the priority would be higher if it's reproducible with the default Ubuntu environment.

I tried this when it was first reported, and I don't see it in GNOME 3.34 on Ubuntu 20.04.

This special handling of Alt is a Unity-specific quirk. Gnome generally doesn't do this.

(In reply to Starbeamrainbowlabs from comment #9)

In the Unity desktop, if you single press ALT on it's own and left the ALT key, then it comes up with a search box that lets you search the current application's menus. This is the closest I can think of, but the bug in Firefox happens on the key press, not key release, as the Unity 7.5 function I've described works.

If that's true then this might be a Gtk widget bug. Still doesn't mean it will be a priority for us, but if somebody wants to contribute a patch that might be the best place to look for a proper fix.

Component: Address Bar → Widget: Gtk
Product: Firefox → Core

:mak Ah, I see. That's a shame. If you have documentation on how to get started hacking on Firefox I'd be happy to give it a go. I've never contributed before, but I'd be happy to drive in and take a look - though I'm wary off there being a large amount of complexity I'd have to learn first about the system that is in place already.

::dao A gtk widget bug? I'd be happy to start looking there, but I'd need to guidance as I have never contributed before - though I am pompey competent in JS and have a working knowledge of C++, amongst others :-)

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P5 → --
Severity: normal → S3

Closing this as WFM since the issue no longer occurs on latest Fx 119.0a1, Fx 118.0b3 and Fx 117.0RC builds.
If a website is open, and in the URL bar the user inputs a website for which there is auto-complete and then presses ALT+ENTER, the user is taken to the autocompleted website in a new tab.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.