Vue.draggable: It doesn't work in wechat browser(version 6.6.1)

Created on 30 Jan 2018  路  3Comments  路  Source: SortableJS/Vue.Draggable

Android

Before did not update to the wechat letter 6.6.1, I used in wechat letter browser vuedraggable has no problem, but, after the update vuedraggable stopped work, but in other browsers don't have any problem, do not know to have people encounter this problem

Because many places in the project are used to vuedraggable, the replacement cost is relatively large, so I hope the master can help to find the problem.

Most helpful comment

After my debugging, I found the reason, because in the new WeChat browser, the _triggerDragStart (line 461) method in the new WeChat browser gets the evt. PointerType is undefined, so I cannot execute the drag-and-drop code. In the old version of the WeChat browser, the evt.pointerType gets "touch". My solution is to determine type of evt pointerdown is as a trigger for touch events, this is just a temporary solution, what side effect is not clear, but for the time being able to work in the ios and android.


add some code in Sortable.js in line 482

image

All 3 comments

After my debugging, I found the reason, because in the new WeChat browser, the _triggerDragStart (line 461) method in the new WeChat browser gets the evt. PointerType is undefined, so I cannot execute the drag-and-drop code. In the old version of the WeChat browser, the evt.pointerType gets "touch". My solution is to determine type of evt pointerdown is as a trigger for touch events, this is just a temporary solution, what side effect is not clear, but for the time being able to work in the ios and android.


add some code in Sortable.js in line 482

image

success, good job~

I met the same problem, because I plan to package my project into a desktop application, which needs the module miniblink, so I can't get the property of evt.pointertype, but I have a desktop application, so I just need to run the code

on(document, 'mousemove', this._onTouchMove);

Maybe we can try to make a further judgment according to the UA header?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fedenko picture fedenko  路  3Comments

parthibeyond picture parthibeyond  路  3Comments

clemsontiger picture clemsontiger  路  3Comments

ghost picture ghost  路  3Comments

Laraveldeep picture Laraveldeep  路  3Comments