Skip to content

Commit

Permalink
fix slab#2031, listEventHandler: call preventDefault() on touchstart
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarcelino committed Mar 21, 2018
1 parent 96e38e9 commit 1e54af5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion formats/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ class List extends Container {
blot.format('list', 'checked');
}
}
const listTouchEventHandler = (e) => {
e.preventDefault();
return listEventHandler(e);
}

domNode.addEventListener('touchstart', listEventHandler);
domNode.addEventListener('touchstart', listTouchEventHandler);
domNode.addEventListener('mousedown', listEventHandler);
}

Expand Down

0 comments on commit 1e54af5

Please sign in to comment.