Closed Bug 1190311 Opened 9 years ago Closed 3 years ago

Context menu and suggestions panel both appear when right clicking an unfocused searchbar above or below the text field

Categories

(Firefox :: Search, defect, P4)

defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox42 --- affected

People

(Reporter: florian, Unassigned)

References

()

Details

(Whiteboard: [fxsearch])

(Jeffrey Alexander from bug 1103455 comment #43)

> Although right-clicking on the text area or icons within the unfocused
> search box does now function correctly, doing so above or below the area
> where the pointer switches to a text cursor still incorrectly reveals two
> menus.

I can reproduce this, it seems we missed an edge case while fixing bug 1103455.

Dave, would you be any chance remember enough of this code to be able to guess quickly what a fix could be?

> Likewise if left clicking the text and then right-clicking in the brief
> moment before the "suggestions" menu appears.

I haven't been able to reproduce this. I see somewhat erratic behavior when following these steps, but I haven't managed to get both the context menu and the suggestions panel to be visible at the same time.
Flags: needinfo?(dtownsend)
(In reply to Florian Quèze [:florian] [:flo] from comment #0)
> (Jeffrey Alexander from bug 1103455 comment #43)
> 
> > Although right-clicking on the text area or icons within the unfocused
> > search box does now function correctly, doing so above or below the area
> > where the pointer switches to a text cursor still incorrectly reveals two
> > menus.
> 
> I can reproduce this, it seems we missed an edge case while fixing bug
> 1103455.
> 
> Dave, would you be any chance remember enough of this code to be able to
> guess quickly what a fix could be?

I can't see an obvious reason for this. The suggestions look to be triggered by the focus event but the code explicitly ignores focus triggered by mouse: https://dxr.mozilla.org/mozilla-central/source/browser/components/search/content/search.xml#753

I would guess something to do with the focus of the inner text box or just autocomplete being autocomplete. Not sure without debugging and I'm pretty swamped right now.

> > Likewise if left clicking the text and then right-clicking in the brief
> > moment before the "suggestions" menu appears.
> 
> I haven't been able to reproduce this. I see somewhat erratic behavior when
> following these steps, but I haven't managed to get both the context menu
> and the suggestions panel to be visible at the same time.

I see the context menu appear then the suggestions appear immediately after. The context menu is still visible underneath.
Flags: needinfo?(dtownsend)
To clarify all STRs of incorrect behavior:   (on Win7, Nightly 42.0a1 (2015-08-03)) 
[just watch the video]
0. Type "asdf" in searchbar
(A)
1. Place mouse between "s" and "d"
2. Press Left and Right mouse buttons (order doesn't matter)
3. Release Right mouse button, then Left mouse button
(B) & (C)
1.   Place mouse on magnifier icon
2.   Press left and right mouse buttons (order doesn't matter)
3.B) Release Right, then Left mouse button
3.C) Release Left, then Right mouse button
(D)
1. Place mouse in content area
2. Press Right mouse button
3. Move mouse between "s" and "d"
4. Release Right mouse button
(E) & (F)
1.   Click on content area (so that searchbar lost focus)
2.E) Place mouse above of below the "asdf", but still in the white area
2.F) Place mouse above of below the "asdf", on the border of white area
3.   Press Right mouse button
4.   Hold it for few seconds (to see that autocomplete was opened), then release
Priority: -- → P4
Summary: Context menu and suggestions panel both appear when right clicking an unfocused searchbar above of below the text field → Context menu and suggestions panel both appear when right clicking an unfocused searchbar above or below the text field
Whiteboard: [fxsearch]
Rank: 45
See Also: → 1219510
See Also: → 1238287
>>>   My Info:   Win7_64, Nightly 46, 32bit, ID 20160110030214
Bug 1110771 introduced additional scenario:
(G)
1. Click the magnifier icon in Search Bar
2. Right-click any alternate search engine [context menu will appear]
3. Hover mouse over the magnifier icon (don't move mouse pointer after this step)
4. Hold Right mouse button
5. Release Right mouse button

AR: Both context menu and search popup are visible
ER: Search popup should disappear after Step 4

Notes:
 1) This scenario causes an additional case of horrifying bug 1238287
 2) If any of A-G aren't relevant and should be filed separately, please tell that explicitly.
Blocks: 1110771
See Also: → 1242765
Can we finally set this bug to confirmed?
See Also: → 1473058

Hi, I think that this bug is no longer valid in the face of the latest changes on the browser. If I'm mistaken, please reopen it.
Regards, Flor.

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.