最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - Violation Forced reflow while executing Javascript in console when tooltip appear on slider handle - Stack Overflow

programmeradmin5浏览0评论

I have a web page with some elements and Ant.design slider. My slider values are controlled via React states. When the slider tooltip is turn on, the slider is very slow to react and in the console I see:

[Violation] Forced reflow while executing Javascript took ...

When the slider tooltip is turned off, the slider speed is back to normal; and the console message only appears when I hover the mouse over the slider handle (without moving the handle).

How can I fix this [Violation] Forced reflow error in tooltip? Thanks' in advance!

I have a web page with some elements and Ant.design slider. My slider values are controlled via React states. When the slider tooltip is turn on, the slider is very slow to react and in the console I see:

[Violation] Forced reflow while executing Javascript took ...

When the slider tooltip is turned off, the slider speed is back to normal; and the console message only appears when I hover the mouse over the slider handle (without moving the handle).

How can I fix this [Violation] Forced reflow error in tooltip? Thanks' in advance!

Share Improve this question edited Feb 25, 2023 at 9:34 MeSo2 4661 gold badge7 silver badges19 bronze badges asked Feb 8, 2018 at 19:03 EvgeniyEvgeniy 3,3496 gold badges26 silver badges41 bronze badges 1
  • By any chance you are using imwheel? If yes, can you try disabling that and see if the violations are still there. – zean_7 Commented Jul 2, 2021 at 14:33
Add a comment  | 

1 Answer 1

Reset to default 9

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.

发布评论

评论列表(0)

  1. 暂无评论