Stopping Chrome From Changing Cursor To A Globe While Dragging A Link
I have a standard link such as: Test In Chrome, clicking and dragging on this link will result in the cursor changing to an arrow dragging a globe
Solution 1:
Try use event.preventDefault() in onmousedown
<ahref="/test.js"onmousedown="event.preventDefault()">Test</a>
Solution 2:
This is an old question, but still came up on the top. Doing event.preventDefault()
as suggested in another answer prevents drag events from occurring. I found that setting the dataTransfer.effectAllowed
property in ondragstart
event to something like move
gets rid of the globe being set. See https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/effectAllowed
I logged an issue against Chromium about not allowing the cursor to be set while a drag event is occurring: https://bugs.chromium.org/p/chromium/issues/detail?id=1232555
Post a Comment for "Stopping Chrome From Changing Cursor To A Globe While Dragging A Link"