Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Violation Forced reflow while executing Javascript in console when tooltip appear on slider handle

I have a web page with some elements and Ant.design slider present too. Slider values is controlled by React state. When slider tooltip is turn on, slider is very slow down and in console I see a message [Violation] Forced reflow while executing Javascript took ....

enter image description here

When slider tooltip is turn off, slider speed becomes normal. Message is appear in console also if I'am only point a mouse on slider handle (without moving handle).

How can I fix bad behaviour with tooltip? Thank's in advance!

like image 223
Evgeniy Avatar asked Feb 08 '18 19:02

Evgeniy


1 Answers

Slider with tooltip is a standard feature that normally works well, so chances are you have some performance issue in your code.

See the accepted answer to Violation Long running JavaScript task took xx ms for some useful tips on how to locate problems.

For more detailed help you need to post your code, preferably as an executable example.

like image 170
Jesper We Avatar answered Nov 18 '22 22:11

Jesper We