Skip to content

Commit 4e60597

Browse files
committed
fix(listView): No slide drag if no hidden buttons. Fixes #847
1 parent b8d4c51 commit 4e60597

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

js/views/listView.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,15 @@
441441

442442
// Or check if this is a swipe to the side drag
443443
else if(!this._didDragUpOrDown && (e.gesture.direction == 'left' || e.gesture.direction == 'right') && Math.abs(e.gesture.deltaX) > 5) {
444-
this._dragOp = new SlideDrag({ el: this.el });
445-
this._dragOp.start(e);
446-
e.preventDefault();
447-
return;
444+
445+
// Make sure this is an item with buttons
446+
var item = this._getItem(e.target);
447+
if(item && item.querySelector('.item-options')) {
448+
this._dragOp = new SlideDrag({ el: this.el });
449+
this._dragOp.start(e);
450+
e.preventDefault();
451+
return;
452+
}
448453
}
449454

450455
// We aren't handling it, so pass it up the chain

0 commit comments

Comments
 (0)