prevent touch event from firing two draginit events (touching seems to trigger touchstart and mousedown)
This commit is contained in:
parent
46eaf3518d
commit
4d0b5561a0
2 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue