HTML5 Drag Release offsetX offsetY jump

后端 未结 5 567
暖寄归人
暖寄归人 2021-01-02 07:19

I\'m playing with the HTML5 drag and drop and tracking the mouse position while dragging.

OffsetX and OffsetY works awesome until you release the mouse, the offsets

5条回答
  •  自闭症患者
    2021-01-02 08:04

    Google Chrome BUG: Be aware!

    I am reporting this as of Chrome version 68.* and earlier so it may be fixed later on. Been pulling my hair out for ages as I have two different computers, both with Windows 10 and the exact same version of Chrome. On one, the HTML 5 ghost layer doesn't skip forward when you start to drag it yet (works perfectly) on the other computer it skips!

    Finally discovered that this happens when you change the font size on your Windows Display Settings. (Right click on desktop -> Display Settings - > Scale and Layout).

    If you change the font size to be anything other than 100% it messes up the ghost. I have a computer with a 4k monitor that needed 150% font size and my other stayed at 100%.

    Doesn't seem to be happening in Opera or Edge and hav'nt had time to test all browsers. I have already reported it to Google.

    Basic example http://jsfiddle.net/w9uyc5k4/

提交回复
热议问题