Closed Bug 1457085 Opened 7 years ago Closed 7 years ago

Unable to navigate through auto-complete matches with a mouse scroll wheel, scroll events go to outer listbox and not pop-up's rich listbox

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(thunderbird60+ fixed, thunderbird62 wontfix, thunderbird63 fixed)

RESOLVED FIXED
Thunderbird 63.0
Tracking Status
thunderbird60 + fixed
thunderbird62 --- wontfix
thunderbird63 --- fixed

People

(Reporter: de.berberich, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce: Open a compose window, begin to type a recipient address in the address field. Thunderbird's address auto-complete feature opens a drop-down window with a list of contacts containing the chain of signs you typed. If there are many matches a scroll bar will appear on the right side of the drop-down window. Try to navigate through the list of matches with the mouse wheel (in my case Apple Magic Mouse) to display the contacts at the bottom of the list. Actual results: In Thunderbird 60 beta it is impossible to move the scroll bar down or up with the mouse wheel. To display contacts at the bottom of the list you'll have to move the scroll bar with the mouse pointer. Expected results: Navigating through the auto-complete matches with the mouse wheel should be enabled. Reproducible: always
Right, confirmed. That was working in TB 52. Most likely related to bug 1427366 and friends (bug 1438669, bug 1434877). Alice, can you find a regression window for us. Marco and Paolo: Those changes earlier this year, would they have caused the loss of the mouse wheel?
Flags: needinfo?(paolo.mozmail)
Flags: needinfo?(mak77)
Flags: needinfo?(alice0775)
Keywords: regression
Thanks Alice, so this goes back to the autocomplete changes back in February: M-C bug 1427366, bug 1427363 and bug 1427364, and in C-C bug bug 1436290 which ported bug 1427350. So Marco and Paolo need to tell us what happened to the scroll wheel.
The main changes I can think of are that we converted the contents away from the "tree" element, and we changed the binding that hosts the elements. Maybe some specific "tree" scrolling code or some "scrollbox" behavior was lost in the process. Also from the looks of bug 1436290 it seems there are some Thunderbird-specific bindings involved, so this bug may be due to the interaction between the two.
Flags: needinfo?(paolo.mozmail)
Flags: needinfo?(mak77)
Richard, could you please take a look.
Flags: needinfo?(richard.marti)
What I can say is, that the scrolling in gloda autocomplete with the special bindings still works, but the normal, without special bindings, autocomplete in composer doesn't work correctly. On Windows, when I try to scroll it does scroll, but with about a second delayed and only for some pixels. So I think here "Maybe some specific "tree" scrolling code or some "scrollbox" behavior was lost in the process." happened.
Flags: needinfo?(richard.marti)
Where are the "special" gloda bindings? Do we need to clone some of them to "normal" autocomplete?
Flags: needinfo?(richard.marti)
Paolo and Marco, I still need some help here. Richard tells us that no specific bindings are used for "normal" recipient address auto-complete. Bug 1436290 only landed https://hg.mozilla.org/comm-central/rev/f842916b9211, so it renamed _matchCount to matchCount to follow the M-C changes. In so far, I don't understand comment #4. Where is the code that controls the scrolling with the mouse wheel, an what do I need to look for in TB to see what could affect it?
Flags: needinfo?(paolo.mozmail)
Flags: needinfo?(mak77)
I'm not sure I can help much, I know as much as you about the underlying layout code. Nothing jumps at my eyes from your bindings. So, the change moved you from a tree-based binding to a richlistbox-based binding. Both should support scrolling properly, rlb is based on listbox (that has some scrolling APIs and a scrollFrame, see layout/xul/nsListBoxBodyFrame.cpp) and it also wraps all its children in a scrollbox. A few things you may check that may be useful: is the panel properly focused, maybe you move the focus elsewhere? Do you see "scroll" events if you try to listen for them? Any special css attributes related to overflow on that popup/rlb? any mouse event handlers that may misbehave?
Flags: needinfo?(paolo.mozmail)
OK, the problem is this. Our addressing widget is a listbox and every list cell contains an auto-complete text box. When a pop-up of one of those text boxes is up and you scroll, the parent listbox eats the scroll event. You can see this when you enter more addresses than fit into the box. On the last one, trigger the auto-complete, then scroll. The auto-complete aborts and the list scrolls. That's not what we need :-(
Hmm, we actually haven't changed anything, we always had a list(box) of recipient addresses and each list was a text box with auto-complete. Scrolling always worked and we didn't suddenly add code to move the focus elsewhere. In fact, if you click on the scrollbar of the popoup, the focus should be on the popup. So this looks like a XUL bug to me. When you have a list within a list, the wrong list gets the scroll event. That explains why our Gloda auto-complete still scrolls: It's a stand-alone widget, not embedded in another list. Where from here?
Flags: needinfo?(enndeakin)
Summary: Unable to navigate through auto-complete matches with a mouse scroll wheel → Unable to navigate through auto-complete matches with a mouse scroll wheel, scroll events go to outer listbox and not pop-up's rich listbox
It looks like listbox uses a capturing listener at https://searchfox.org/mozilla-central/source/toolkit/content/widgets/listbox.xml#883 Perhaps removing the capturing is sufficient, although you need to be careful to not cause issues like bug 300245.
Flags: needinfo?(enndeakin)
Do you know how to "remove the capturing" Neil mentioned?
Flags: needinfo?(richard.marti)
Flags: needinfo?(acelists)
Flags: needinfo?(mak77)
Sorry, I don't know what this is.
Flags: needinfo?(richard.marti)
(In reply to Neil Deakin from comment #13) > It looks like listbox uses a capturing listener at > https://searchfox.org/mozilla-central/source/toolkit/content/widgets/listbox. > xml#883 > Perhaps removing the capturing is sufficient, although you need to be > careful to not cause issues like bug 300245. I tried "bubbling" (default) and "target" and it didn't make a difference. What's next?
Flags: needinfo?(enndeakin)
See Also: → 1471415
As stated in comment #11, there is something wrong with the XUL listbox. While working on bug 1475817 attachment 8992829 [details] [diff] [review], I noticed that switching to richlistbox for the addressing widget fixes the issue and the scroll with the mouse works again. Geoff, would it be possible to backport only the changes in messengercompose.xul to TB 60 or are they tied in with the other files? Could you provide a patch?
Flags: needinfo?(geoff)
Flags: needinfo?(enndeakin)
Flags: needinfo?(acelists)
Fixed by bug 1475817. I'll backport the relevant patch to TB 60 ESR and TB 62 beta.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 63.0
FRG, I will uplift https://hg.mozilla.org/comm-central/rev/7962d601822d193cccf877bba6c2f0e3908af7a9 to comm-esr60. Maybe the changes here https://hg.mozilla.org/comm-central/rev/7962d601822d193cccf877bba6c2f0e3908af7a9#l5.2 in mailnews/addrbook/content/abMailListDialog.js will affect SM. If so, please take appropriate action.
Flags: needinfo?(frgrahl)
Attached file uplift needed.txt
Patches come from bug 1475817. Part 9 and two follow-ups.
Attachment #8993968 - Flags: approval-comm-esr60+
Attachment #8993968 - Flags: approval-comm-beta+
> FRG, I will uplift No problem. mailnews is still broken. I am still fixing up the browser part. We will need to retest everything and will tackle this when the times comes.
Flags: needinfo?(frgrahl)
Attachment #8993968 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: