You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@phphe There is still an issue on mobile when page has scroll. Not always. But drag is happening only when we carefully drag the item. I am using version 2.2.17. Any workarounds?
@phphe Seem to work fine, if we do preventDefault on item/handle's touchstart & touchmove events. I have currently done it on item slot which works for me. But I can raise a pull-request by adding those in code. Please let me know.
Activity
phphe commentedon Jun 8, 2018
ok, i will try that today
shaydoc commentedon Jun 8, 2018
great thanks, it should be a matter of adding the touch event listeners to your draggablehelper ?
phphe commentedon Jun 11, 2018
@shaydoc yes. i tried, branch dev-mobile: https://github.com/phphe/vue-draggable-nested-tree/tree/dev-mobile. There is an issue, the page will move when drag
shaydoc commentedon Jun 12, 2018
@phphe did you have any joy looking at making the control touch enabled ?
phphe commentedon Jun 13, 2018
@shaydoc yes. So I created the branch dev-mobile. There are some bugs.
shaydoc commentedon Jun 14, 2018
Cool
shaydoc commentedon Jun 14, 2018
I did some touch stuff yesterday, jquery.nestable handles it well
https://github.com/RamonSmit/Nestable2/blob/master/jquery.nestable.js
phphe commentedon Jul 29, 2018
@shaydoc I merged mobile in latest version. There is an issue: page scrolling on drag. I don't have any idea now.
shaydoc commentedon Aug 6, 2018
@phphe
I found that using mouse/touch position solves this rather nicely, any thoughts?
`function resolveDragedElAndInitialPosition(e) {
var el0 = opt.getEl ? opt.getEl(dragHandlerEl, opt) : dragHandlerEl;
var el = el0;
if (opt.clone) {
store.triggerEl = el0;
el = el0.cloneNode(true);
el0.parentElement.appendChild(el);
}
var pos = offsetToPosition(el, getOffset(el0));
pos.y = e.pageY;
return {
position: pos,
el: el
};
}`
phphe commentedon Aug 10, 2018
@shaydoc try latest 2.1.3
ram33 commentedon May 7, 2019
@phphe There is still an issue on mobile when page has scroll. Not always. But drag is happening only when we carefully drag the item. I am using version 2.2.17. Any workarounds?
Thank you for this nice library btw.
ram33 commentedon May 8, 2019
@phphe Seem to work fine, if we do preventDefault on item/handle's touchstart & touchmove events. I have currently done it on item slot which works for me. But I can raise a pull-request by adding those in code. Please let me know.
phphe commentedon May 9, 2019
@ram33 awesome. please raise it, i will check that.
ram33 commentedon May 11, 2019
@phphe please check #71