Closed Bug 1127922 Opened 9 years ago Closed 9 years ago

The first 5 times you try to type in the searchbar, the dropdown briefly flickers and then your browser completely loses focus

Categories

(Firefox :: Search, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dholbert, Unassigned)

References

Details

(Keywords: regression)

Attachments

(2 files)

The new searchbar experience (from December) has a pretty annoying UI bug, the first time you use it, on Ubuntu. I haven't filed a bug on it because I assumed someone already had, but it still affects nightly so I'm going to assume that it might not be a known issue.

STR:
 1. Start Firefox with a new profile.
 2. Click search bar or type Ctrl+K.
 3. Type something.

ACTUAL RESULTS: After you type your first character, the search dropdown briefly appears, and then immediately disappears and your browser loses focus, so your typing is interrupted.

If you then click back in the search bar to try to keep typing, this happens again. (dropdown appears, browser loses focus) Eventually it stops happening (permanently, for that profile), but not until repeating several times.

This makes it impossible to type a search term.

Given that this only happens in fresh profile, I'm guessing it's dependent on some sort of "what's this?" user-education popup that might be trying to appear the first time the search dropdown comes up.
Here's a screencast of this happening in Nightly.
Attachment #8557186 - Attachment description: screencast → screencast in Nightly
Here's a screencast of this happening in release. In this screencast, you can see the "helpful" popup that's appearing the first few times this menu opens -- it says "One-Click Searches".

The bug seems to keep reproducing until that popup stops trying to appear.
Attachment #8557186 - Attachment description: screencast in Nightly → screencast in Nightly 38
Looks like this "One-click Searches" bubble was added in bug 1101654, based on MXR searching.

This about:config pref from that bug's commit seems to explain why it happens repeatedly in a fresh profile, and then stops:
>    1.12 +// How many times to show the new search highlight
>    1.13 +pref("browser.search.highlightCount", 5);
>    1.14 +
Blocks: 1101654
Flags: needinfo?(dtownsend)
Keywords: regression
Summary: The first time you type a character in the searchbar, the dropdown briefly flickers and then your browser completely loses focus → The first 5 times you try to type in the searchbar, the dropdown briefly flickers and then your browser completely loses focus
(I know this isn't just me / my machines, too -- billm mentioned hitting this bug as well.)
I'm using Ubuntu 14.10 with gnome-shell, FWIW.
We've seen a few odd things with this UI, like bug 1108273 but we aren't sure what is going on because none of us can reproduce it yet. By which I mean to say that you have the most power to help us find a solution right now ;)

However it's likely that we're going to remove the popups in bug 1123620 so it probably isn't worth spending much energy on.
Flags: needinfo?(dtownsend)
Depends on: 1123620
(In reply to Dave Townsend [:mossop] from comment #6)
> We've seen a few odd things with this UI, like bug 1108273

Gotcha.  The symptoms in that bug are a bit different (comparing the youtube video over there to my screencast here), but yeah, seems likely that it might all be the same problem under the hood.

> However it's likely that we're going to remove the popups in bug 1123620 so
> it probably isn't worth spending much energy on.

Ah, that's good news.  I was going to suggest removing these popups on linux at least, as one solution for this bug, if this affects common linux configurations (not sure yet, as I only have myself & billm as data points).
See Also: → 1108273
I confirmed that I get this bug in a "gnome-flashback" (classic gnome style) desktop session, as well as with gnome-shell (the gnome 3 fancy desktop session).

I do not hit it with Ubuntu Unity (the default session on Ubuntu), though, which is probably why this hasn't caused as much pain as I initially assumed.
(In reply to Daniel Holbert [:dholbert] from comment #8)
> I confirmed that I get this bug in a "gnome-flashback" (classic gnome style)
> desktop session, as well as with gnome-shell (the gnome 3 fancy desktop
> session).

From the screencast it looks like those sessions cause the searchbar to lose focus when the tour popup is displayed. That is why the search popup gets hidden. There isn't in the tour popups that should be focusable so not sure what is getting focused there.
The call to HidePopup has this JS backtrace:
{
0 hidePopup() ["chrome://global/content/bindings/popup.xml":113]
    this = [object XULElement]
1 closePopup() ["chrome://global/content/bindings/autocomplete.xml":809]
    this = [object XULElement]
2 closePopup() ["chrome://global/content/bindings/autocomplete.xml":340]
    this = [object XULElement]
3 set_popupOpen(val = false) ["chrome://global/content/bindings/autocomplete.xml":94]
    this = [object XULElement]
4 detachController() ["chrome://global/content/bindings/autocomplete.xml":326]
    this = [object XULElement]
5 onxblblur(event = [object FocusEvent]) ["chrome://global/content/bindings/autocomplete.xml":572]
    this = [object XULElement]
}
and my GDB backtrace shows this, after I backtrace up through the frames for that JS:
{
57 nsFocusManager::Blur
58 nsFocusManager::WindowLowered
59 nsWebShellWindow::WindowDeactivated
}

So it looks like our whole window (not just the autocomplete) is losing focus. (This matches the symptoms I experienced, too -- all firefox keyboard commands stop working, until I manually click the firefox window to give it focus back.)
Maybe the session sees the new popup, attempts to focus something in it but since it fails to the app loses focus? It's sounding like a bug with the window manager to me but it's out of my area of expertise at this point.
No longer relevant due to bug 1123620.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: