ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

Slider: infinite class change when I click slider handle then hover handle outside

Open KumJungMin opened this issue 10 months ago • 1 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.1.0

Environment

chrome version 123.0.6312.86

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  • first, click slider handle
  • second, i move cursor to handle outline
  • then, infinite class change is happened

https://github.com/vueComponent/ant-design-vue/assets/37934668/3b58efa5-680d-4971-959c-1b0ce9302cff

What is expected?

  • infinite class change is not happened

What is actually happening?

  • infinite class change is not happened
  • so tooltip is blinked fast.

KumJungMin avatar Mar 27 '24 00:03 KumJungMin

after read the source code, i found that silder handle is wraped by SliderTooltip component. and the top of tooltip component covered the edge of handle. when we move cursor to the overlap position, the onMouseEnter event is fired, and the tooltip shows, because the tooltip is on the top, onMouseLeave event is called. and this cause the infinite loop.

move the tooltip container down a little can solve this problem. but i'm confused where the position style is generated.

qppq54s avatar Mar 28 '24 06:03 qppq54s

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar May 28 '24 02:05 github-actions[bot]