FIX: sometimes stuck of sidebar reorder (#22654)

When the mouse was moved quickly, the browser stayed in drag and drop mode and an additional click was required to exit drag and drop mode.
This commit is contained in:
Krzysztof Kotlarek 2023-07-18 11:56:43 +10:00 committed by GitHub
parent 3da6759860
commit b719688887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -84,12 +84,13 @@ export default class SectionLink {
dragMove(event) {
this.startMouseY = this.#calcMouseY(event);
event.stopPropagation();
event.preventDefault();
if (!this.drag) {
return;
}
event.stopPropagation();
event.preventDefault();
const currentMouseY = this.#calcMouseY(event);
const distance = currentMouseY - this.mouseY;