Skip to content

Commit

Permalink
fix: selecting events in chrome (jquense#884)
Browse files Browse the repository at this point in the history
* fix selecting events in chrome

* add comment.
  • Loading branch information
shundy authored and jquense committed Jun 26, 2018
1 parent f9b5d53 commit 558ee2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ class Selection {
top = Math.min(pageY, y),
old = this.selecting

// Prevent emitting selectStart event until mouse is moved.
// in Chrome on Windows, mouseMove event may be fired just after mouseDown event.
if (!old && !(w || h)) {
return
}

this.selecting = true
this._selectRect = {
top,
Expand Down

0 comments on commit 558ee2d

Please sign in to comment.