Opened 15 years ago
Closed 14 years ago
#1380 closed defect (fixed)
tooltip flickers a scrollbar when in a popup window and appearing for the first time
Reported by: | tdondich | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 0.9beta |
Component: | Dijit | Version: | 0.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
When hovering over a connectId node for a tooltip for the first time, the popup window flickers and shows an additional scrollbar when appearing. Hovering over the connectId subsequent times will not cause the flicker.
Change History (8)
comment:1 Changed 15 years ago by
Milestone: | → 0.5 |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
I am afraid without showing the dom first, the size of the dom can not be determined correctly, at least in one of the most popular browser
the relative code is in PopupContainer?.js
comment:4 Changed 14 years ago by
I'll have to look at this more thoroughly later, but note that a common technique is to display the element off screen first (like at x=-9999px, y=-9999px) and then move it on screen. Not sure if that makes sense/is possible in this case or not.
comment:5 Changed 14 years ago by
Has anyone looked into this, yet? I've experimented with "open:" in PopupContainer?.js and my stylesheets but to no avail. :(
comment:6 Changed 14 years ago by
i have posted a nasty workaround (includes tiny patch for Tooltip.js) to the mailing list.
Message-ID: <[email protected]> Subject: [Dojo-interest] [patch] Suppress Tooltip-flicker when using href=
comment:7 Changed 14 years ago by
Component: | Widgets → Dijit |
---|
comment:8 Changed 14 years ago by
Milestone: | 0.9 → 0.9beta |
---|---|
Resolution: | → fixed |
Status: | new → closed |
OK, this is fixed in Dijit; the sizing is done with visibility:hidden (or is it offscreen? I forget.) In any case, I tested and saw no flickering.
This is because the tooltip temporarily appears at the very bottom of the page. It can cause not only scrollbar flickr, but other momentary layout issue. I believe the way to fix it is simply to make sure the tooltip is positioned before it is made visible, but so far I've been unable to locate the relevant code.
In the meantime, a workaround is to (a) set display to none for all dojoTooltip objects in your CSS, and then connect an event handler to Tooltip.open() that sets the individual tool tip's display attribute to block. Not ideal but at least it doesn't involve modifying the Dojo code directly.