Opened 11 years ago

Closed 7 years ago

#6968 closed enhancement (wontfix)

Tooltip: enhancement to follow mouse

Reported by: alex Owned by: dylan
Priority: low Milestone: future
Component: Dijit Version: 1.1.1
Keywords: Cc: bill
Blocked By: Blocking:

Description

attached i a patch to enhance tooltips with a "followMouse" flag which allows them to be used for "hover inspection", a common use-case.

Attachments (1)

Tooltip_followMouse.diff (11.4 KB) - added by alex 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by alex

Attachment: Tooltip_followMouse.diff added

comment:1 Changed 11 years ago by alex

Type: defectenhancement

comment:2 Changed 11 years ago by alex

Cc: bill added

bill: have you had a chance to look at this? I'd really like to get it merged in for 1.2 so we can use it with charts.

comment:3 Changed 11 years ago by bill

I checked this over briefly. It looks nice but I see a few issues that need to be fixed:

  • it's not accessible. If you tab into a node w/a tooltip, the tooltip doesn't appear. (The current code works correctly in this case.) Probably when triggered by onFocus rather than by onMouseEnter, the tooltip should be displaying with the arrow, positioned according to the target node (ie, as it works currently).
  • sometimes the tooltip appears off screen, when the target element is at the bottom of the viewport.
  • tooltip sometimes jumps. Example timeline:
    1. onMouseEnter occurs at (100,100)
    2. user moves mouse to (100,200), still over target node
    3. tooltip starts to fade in
    4. tooltip finishes fading in
    5. user moves mouse again

The tooltip fades in near (100,100), and jumps on step #5 to near (100,200).

I think if you roll in the code from charting/action2d/Tooltip..js into place.js, so that placeAroundElement() works on a rectangle too, it might solve the positioning problem, because you can position the tooltip according to an imaginary rectangle around the mouse cursor (36x36px)

comment:4 Changed 11 years ago by bill

Owner: changed from bill to alex

comment:5 Changed 11 years ago by bill

Milestone: 1.2future
Summary: [patch][cla] tooltip enhancement to follow mouse[patch][cla] Tooltip: enhancement to follow mouse

Too late for 1.2. This would be a nice enhancement to get in at some point if the above issues are fixed (or could go into dojox).

comment:6 Changed 8 years ago by Chris Mitchell

Owner: changed from alex to dylan

please review/triage

comment:7 Changed 7 years ago by dylan

Priority: highlow
Summary: [patch][cla] Tooltip: enhancement to follow mouseTooltip: enhancement to follow mouse

Is this a feature worth considering for 2.0, or not so much? The existing patch from alex is unfortunately very stale and had issues before then, so removing the patch and cla flags.

comment:8 Changed 7 years ago by bill

Resolution: wontfix
Status: newclosed

It's a toss up. We can close it.

Note: See TracTickets for help on using tickets.