Opened 13 years ago
Closed 9 years ago
#7760 closed defect (fixed)
Tooltip for ComboBox, FilteringSelect not positioned properly
Reported by: | stekell2 | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.8 |
Component: | Dijit | Version: | 1.2beta |
Keywords: | Combobox FilteringSelect Tooltip | Cc: | |
Blocked By: | Blocking: |
Description (last modified by )
For ComboBox or FilteringSelect, if using a tooltip (dijit.Tooltip with connectId), the tooltip (when on the right) covers up the right portion of the widget rather than being fully to the right of the widget. It covers up the area used by the down arrow. Thus making it seem impossible to use the arrow.
If you use set the promptMessage of the dijit instead, it will be positioned properly - fully to the right of the widget. A dijit.Tooltip should be positioned like this and not cover up the down arrow.
I just verified its still like this in 1.2rc1
Change History (8)
comment:1 Changed 13 years ago by
Component: | General → Dijit |
---|---|
Description: | modified (diff) |
Resolution: | → wontfix |
Status: | new → closed |
comment:2 Changed 13 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Using connectId=widget_foo creates another problem. The tooltip no longer appear when the input is focused. It only appears on onmouseover. The tooltip should appear when the input receives focus and the user is entering data. This is how it works with connectId=foo. Actually, with connectId=foo it works on both mouseover and focus. Which is good, whereas promptMessage only works on focus. Anyway to get this to work on both?
Also, using widget_foo there's a bizarre positioning problem that remains with Firefox 2 (I haven't tried FF3 yet, but IE7 is ok). I haven't found a consistant way to repeat this, but maybe 10% of the time a mouseover results in the incorrect positioning like before.
comment:3 Changed 12 years ago by
Milestone: | 1.2 → 1.4 |
---|
Ah, I see your point about the focus events... that's understandable. We connect to the onFocus event on the connectId node but of course the focus event is on the <input> not the surrounding <div>.
Not sure how to fix that; IIRC focus events don't bubble. Might need some more infrastructure to support this properly.
It seems like you should be able to use the validation messages (invalidPrompt etc.) to get tooltips on form widgets. That doesn't solve your problem?
comment:4 Changed 12 years ago by
Milestone: | 1.4 → future |
---|
comment:5 Changed 10 years ago by
Owner: | anonymous deleted |
---|
comment:6 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
comment:7 Changed 9 years ago by
Component: | Dijit - Form → Dijit |
---|---|
Milestone: | future → 1.8 |
Owner: | set to bill |
Status: | reopened → assigned |
OK I think I can check in a fix so that
<span dojoType=dijit.Tooltip connectId=widget_foo>
works.
Like I said above, you shouldn't need to use a tooltip directly for ComboBox / FilteringSelect, but perhaps the fix will be useful in other cases when focus goes somewhere inside the anchor node.
This is admittedly confusing but actually the issue is that you are specifying the wrong connectId to the Tooltip widget. Remember that the connectId is a DOM node id, not a widget id... If you declare a CombobBox with id=foo, then the <input> node itself gets id=foo and the domNode (which wraps the input node AND the arrow) get id=widget_foo. (Check in firebug to see this.)
So if you do
<span dojoType=dijit.Tooltip connectId=widget_foo> ...
then it should work.