Skip to content

Commit

Permalink
fix: selecting events in mobile browsers (#1233)
Browse files Browse the repository at this point in the history
on longpress range and therefore start and end variables were empty.
  • Loading branch information
martin-strobel authored and jquense committed Feb 22, 2019
1 parent 8fefeee commit 2bc9fee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class Selection {

// 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)) {
if (this.isClick(pageX, pageY) && !old && !(w || h)) {
return
}

Expand Down

0 comments on commit 2bc9fee

Please sign in to comment.