Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ページ内の要素をドラッグ可能にすると、ドラッグすると、この要素の外側のテキストが選択されます。
なぜ、どうやってこれを防ぐのだろうか?
これが私の例です:
灰色のdivをできるだけ速く段落の上にドラッグすると、段落のテキストが選択されます。
デフォルトの動作を防ぐ必要があります
trigger.onmousedown = function(e) { this.style.cursor = "move"; e.preventDefault(); // this line ... }
フィドル