Skip to content

Commit be69e26

Browse files
author
Zbigniew Zasieczny
committed
1 parent a2c9e7c commit be69e26

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/js/thirdparty/jquery.gridster.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*! gridster.js - v0.1.0 - 2013-06-14
22
* http://gridster.net/
3-
* Copyright (c) 2013 ducksboard; Licensed MIT */
3+
* Copyright (c) 2013 ducksboard; Licensed MIT
4+
* 2015-08-12: merged https://github.com/ducksboard/gridster.js/commit/021a6c23e851210c1b817bd353a1e5e19ce10b90 to fix dragging issue in Chrome */
45

56
;
67
(function($, window, document, undefined)
@@ -444,9 +445,9 @@
444445
var $window = $(window);
445446
var isTouch = !!('ontouchstart' in window);
446447
var pointer_events = {
447-
start: isTouch ? 'touchstart.gridster-draggable' : 'mousedown.gridster-draggable',
448-
move : isTouch ? 'touchmove.gridster-draggable' : 'mousemove.gridster-draggable',
449-
end : isTouch ? 'touchend.gridster-draggable' : 'mouseup.gridster-draggable'
448+
start: 'touchstart.gridster-draggable mousedown.gridster-draggable',
449+
move: 'touchmove.gridster-draggable mousemove.gridster-draggable',
450+
end: 'touchend.gridster-draggable mouseup.gridster-draggable'
450451
};
451452

452453
/**
@@ -533,7 +534,7 @@
533534

534535
fn.get_mouse_pos = function(e)
535536
{
536-
if(isTouch)
537+
if (e.originalEvent && e.originalEvent.touches)
537538
{
538539
var oe = e.originalEvent;
539540
e = oe.touches.length ? oe.touches[0] : oe.changedTouches[0];

0 commit comments

Comments
 (0)