ionicList drag Content bug - Codepen provided


#1

Hi,

As I just posted this on slack let make sure its tracked also here. Here is the code pen
showing that when you have ionic list with option buttons the drag content to see left side bar does not work.

When you check this in safari it seems to work, on iPhone, Chrome not working.


#2

The sideMenuCtrl.isDraggableTarget return different values chrome/safari and thefore on chrome it does not continue when chrome eval. that this is not dragable target

function onDragX(e) {
                    if (!sideMenuCtrl.isDraggableTarget(e)) 
                        return;

                    if (getPrimaryScrollAxis(e) == 'x') {
                        sideMenuCtrl._handleDrag(e);
                        e.gesture.srcEvent.preventDefault();
                    }
                }

#3

I just debugged it and it seems that only difference is
inside that isDragable

!e.gesture.srcEvent.defaultPrevented 

returns false

When I look at Safari where it is working the srcEvent is:

   > e.gesture.srcEvent

MouseEvent
altKey: false
bubbles: true
button: 0
cancelBubble: false
cancelable: false
charCode: 0
clientX: 300
clientY: 149
clipboardData: undefined
ctrlKey: false
currentTarget: #document
dataTransfer: null
defaultPrevented: false
detail: 0
eventPhase: 3
fromElement: null
identifier: 1
keyCode: 0
layerX: 194
layerY: -228
metaKey: false
offsetX: 194
offsetY: 19
pageX: 300
pageY: 149
relatedTarget: null
returnValue: true
screenX: 340
screenY: 686
shiftKey: false
srcElement: p.ng-binding
target: p.ng-binding
timeStamp: 1440432364577
toElement: p.ng-binding
type: "mousemove"
view: Window
which: 1
x: 300
y: 149
proto: MouseEventPrototype

And chrome in emulation or OS Emulator

TouchEvent {}
altKey: false
bubbles: true
cancelBubble: false
cancelable: true
changedTouches: TouchList
charCode: 0
ctrlKey: false
currentTarget: document
defaultPrevented: true
detail: 0
eventPhase: 3
keyCode: 0
layerX: 0
layerY: 0
metaKey: false
pageX: 0
pageY: 0
path: Array[12]
returnValue: false
shiftKey: false
srcElement: div.item-content
target: div.item-content
targetTouches: TouchList
timeStamp: 1440432745839
touches: TouchList
type: “touchmove”