Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12297 closed defect (fixed)

[regression] TooltipDialog: disappears on scrollwheel of TooltipDialog content

Reported by: Caleb Maclennan Owned by:
Priority: high Milestone: 1.6
Component: Dijit Version: 1.6.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

I am using dijit.TooltipDialog as the drop down for a dijit.form.DropDownButton. My tooltip content is quite large and on some window sizes produces a scroll bar inside the tooltip. Using the scrollbar works fine, but touching the scrollwheel even while the tooltip has focus causes the dropdown/tooltip to close.

Using dojo 1.6.0b2. Worked in 1.5.0.

Attachments (1)

TooltipDialogLarge.html (1.3 KB) - added by bill 8 years ago.
my test case, TooltipDialog does close when i try to scroll using double finger slide on mac trackpad

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by Caleb Maclennan

Possibly related focus issue in #12298

comment:2 Changed 8 years ago by bill

Description: modified (diff)
Summary: dijit.TooltipDialog disapears on scrollwheelTooltipDialog: disapears on scrollwheel

Sounds like its from [22546], but please attach a test case to all tickets you file using the "attach file" button.

Changed 8 years ago by bill

Attachment: TooltipDialogLarge.html added

my test case, TooltipDialog does close when i try to scroll using double finger slide on mac trackpad

comment:3 Changed 8 years ago by Caleb Maclennan

I just wrote a test case but you beat me to it. Yours also fails with my scroll wheel in Chromium (trunk) and Iceweasel 3.6.13, both on Linux.

comment:4 Changed 8 years ago by bill

Summary: TooltipDialog: disapears on scrollwheel[regression] TooltipDialog: disappears on scrollwheel of TooltipDialog content

OK, this is rather complicated to get exactly right. If the user spins the scroll wheel over the TooltipDialog, it might scroll the TooltipDialog or might scroll the whole page or might scroll nothing, depending on whether the dialog and main page have scroll bars, and what position those scrollbars are at.

Anyway, I'll change it to err on the side of caution and only close the TooltipDialog when the scrollwheel occurs when the cursor is outside of the TooltipDialog.

comment:5 Changed 8 years ago by bill

Resolution: fixed
Status: newclosed

(In [23812]) Don't close popup when the scrollwheel is turned over the popup, in order to scroll the popup. Fixes #12297, refs #5777 !strict.

comment:6 Changed 8 years ago by bill

(In [23866]) Changes related to closing/repositioning popups on scroll / resize:

  • Rollback (erase) code to close popups on window resize (refs #5777, fixes #12317) and mouse wheel (refs #12297).
  • When possible, don't close popups when the browser window is scrolled using the mouse on the browser scroll bar. Popups still close by clicking anywhere else on the page, including inner scrollbars. Unfortunately on IE6 & 7, clicking the browser scrollbar also still causes popups to close.
  • In RTL mode, make place.js set popup.style.right rather than popup.style.left, so that on screen resize (at least in the common case) the popup and the aroundNode stay aligned. (refs #10875)

Background:

  • It's often harmful that resizing a window closes the popup; the user may be expanding the window to see all of the popup. Although resizing can cause a reflow, separating the aroundNode from the popup, but often it doesn't. The case of centered/right-aligned elements mentioned in #5777 is an exception.
  • Closing popups on scroll is also questionable. Scrolling the main window will scroll the aroundNode and the popup together, so it's counterproductive to close the popup. OTOH, scrolling a <div> will separate the aroundNode from the popup. And for a mousewheel event it's hard to tell whether it's affecting the main window or a nested <div>.

In the future, I'll add code to actually reposition popups when a browser window resize or a scroll has caused the aroundNode to move.

!strict.

Note: See TracTickets for help on using tickets.