'Render problems on Safari mousemove

Here is codepen ( https://codepen.io/tst-vtv/pen/jOGjdmM?editors=0100 check link ) to reproduce the problem

This work like I need in chrome and firefox but safari killing me :(

Steps:

  1. click in white canvas rectangle and just move mouse there
  2. try now to move mouse with pressed left mouse button
  3. open safari devtools as docked mode ( not detached window ) click anywhere here and go back over canvas and move the mouse without clicking anywhere
  4. now just click in canvas and move the mouse again

Problem: step 1 and 4 is how it works only in safari and only after I click somewhere

step 2 and 3 show how I expected to see mousemove event step 2 strange but working well like if I had mousedown event step 3 is what I observe after long trials

ANY HELP will be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source