vakata / jstree

jquery tree plugin
http://jstree.com
MIT License
5.15k stars 1.38k forks source link

on hover infanite loop state, maybe add debounce #2625

Closed syonfox closed 1 year ago

syonfox commented 2 years ago

Hello,

https://user-images.githubusercontent.com/9345677/167751167-44f4588c-6baf-44a6-a974-29e0d787322e.mp4

https://user-images.githubusercontent.com/9345677/167752143-0548c5ab-6ead-469c-a069-6772d1563290.mp4

https://user-images.githubusercontent.com/9345677/167752148-5c58b71d-277e-43a7-ab2a-cac2e9ebc9a2.mp4

I have been playing around with it a bit. has anyone come across this issue. My current theory is the event listener for on-mouse-over is running before the animation triggers the function for mouse-leave

Anyone have this issue before or know a fix.
Using latest stable chrome and just a few version old jstree. Tested just now on latest release and still there.

syonfox commented 2 years ago

I think i have narrowed it down to the hover border radius 2px causing a space that on hover is smaller then the outside.

syonfox commented 2 years ago

There may be multiple bugs at play :)

syonfox commented 2 years ago
.jstree-default .jstree-wholerow {
  transition: background-color 0.15s, box-shadow 0.15s;
  border-radius: 2px;
}

https://user-images.githubusercontent.com/9345677/167762261-e24e8d61-daa3-4416-8a8d-7b5b499bd52f.mp4

vakata commented 1 year ago

Thank you for all the research. This seems like a browser / jQuery issue to me. So I understand that anyone facing this issue can disable the border radius and the transition? If so - this ticket will be a good resource (search result). If you think there is something on the jstree end that can be done - let me know and I will reopen. I will also test this with v.4 ASAP.