question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltips : Does not smooth while moving mouse / touch and on mobile tooltip does not disappeared when touch end

See original GitHub issue

Expected Behavior

Bugs :

  • Issue#A : It should be smooth when moving mouse (+ touch on mobile)
  • Issue#B : It should disapreared tooltips when touch end (mobile) (or wait some secs before disapreared, possible while API ?)

dkpiebhfkj

Test / Demo : https://codepen.io/anon/pen/VWbBor

Current Behavior

  • Issue#A : Tooltip is jumping (not smooth)
  • Issue#B : Tooltip does not disappeared when touch end.

Possible Solution

  • Issue#A : Add some delay ? debounce ?
  • Issue#B : Add event onTouchEnd = Hide tooltip ?

Steps to Reproduce (for bugs)

Issue#A

  1. Go to https://codepen.io/anon/pen/VWbBor
  2. Move mouse between bars (Try both slowly and faster)
  3. You will see tooltip is jumping

Issue#B

  1. Go to https://codepen.io/anon/pen/VWbBor (on your mobile)
  2. Touch or move on/to some bar
  3. You will see tooltip does not disappeared when touch end.

Context

Config on options is :

options: {
    tooltips: {
      enabled: true,
      mode: 'index',
      intersect: false
    }
}

Environment

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
danegraphicscommented, Jun 22, 2017

Having tested this I’ve discovered that the problem for the jittery animation is when the tooltip settings are:

      mode: 'index',
      intersect: false

What happens is that when the mouse moves over the index, the tooltip begins to move. However, the moment the mouse hits the bar (if the tooltip is still moving), the tooltip restarts its animation from the beginning.

It looks like intersect: false probably isn’t being read properly (or at all) wherever the tooltip animation is triggered.

It also looks like the “current index” of the tooltip position doesn’t actually get changed until after the animation is complete, which, in my opinion, is not the correct order to do things in. In fact, this is probably the change that caused the problem and revealed that intersect: false doesn’t get checked in index mode.

NOTE: This also happens on line graphs. If you arrive at the index, the tooltip will move, then if you hit the circle for that data point while it’s moving, the tooltip will restart its movement just as it does in the bar graph.

ALSO NOTE: This issue was introduced by 2.6.0 and isn’t found in 2.5.0.

2reactions
chdsbdcommented, Dec 1, 2017

Okay, in my case adding the following fixed it,

options: {
  hover: {
    intersect: false
  }
}

Here is the updated example for issue A mentioned here: https://codepen.io/anon/pen/aVPewe

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap's tooltip doesn't disappear after button click ...
This is because trigger is not set. The default value for trigger is 'hover focus' , thus the tooltip stay visible after a...
Read more >
Tooltips won't vanish when the mouse is no longer over the
Tooltips won't vanish when the mouse is no longer over the - Microsoft Community.
Read more >
Designing Better Tooltips For Mobile User Interfaces
In this article, we show you how to design tooltips that will amplify your mobile designs and explain where mobile tooltips are most ......
Read more >
Tooltips in the time of WCAG 2.1 | Sarah Higley
To do this, the tooltip should open on focus or mouse over, and closes on blur or mouse out. Combining pointer and keyboard...
Read more >
Prototype triggers - Figma Help Center
This triggers the Destination frame when you release the mouse or touch pad. For mobile devices, this is once the user's finger no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found