prevent touch event from firing two draginit events (touching seems to trigger touchstart and mousedown)

This commit is contained in:
jean-emmanuel 2016-03-24 19:58:12 +01:00
parent 46eaf3518d
commit 4d0b5561a0
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,5 @@
// jQuery drag event handler
var startEvent = 'ontouchstart' in window ?'touchstart':'mousedown'
;(function($){
var $document = $(document)
$.event.special.drag = {
@ -60,7 +61,7 @@
return {left: offsetLeft, top: offsetTop}
}
element.on("touchstart.drag mousedown.drag", function(e) {
element.on(startEvent+".drag", function(e) {
previousEvent = e
if (!e.originalEvent.changedTouches) {

View file

@ -12,7 +12,6 @@ if (!settings.read('noGui')) {
console.log(title + ': ' + err)
}
app.commandLine.appendSwitch('--touch-events')
app.on('window-all-closed', function() {
if (process.platform != 'darwin') {