RamonSmit / Nestable2

New pickup of Nestable!
Other
322 stars 147 forks source link

Drag not working in chrome #73

Closed carman8910 closed 7 years ago

carman8910 commented 7 years ago

Im trying enabled Drag functionality, but i cant, its possible it or not. Tank you

RomanBurunkov commented 7 years ago

@carman8910 , can you clarify your situation with more details and also with jsfiddle example? Issue description is realy vague.

carman8910 commented 7 years ago

Im sorry. I have a code using Nestables plugin by David Bushell, it´s works, does not have some functionality that this plugin. Then i try using this version. The problem is that in this version drag functionality does not work, specifically wih chrome, i tried in iexplorer and it works, but chrome fail. Thanks for your help

RomanBurunkov commented 7 years ago

@carman8910 I can't confirm that. Drag works for me in all browsers including mobile.

I think you can have some issue with css or html which is not compatible, so add more details about your code or ksfiddle sample.

carman8910 commented 7 years ago

https://jsfiddle.net/dekkard/uh5eL5sc/ I have probe this code. In IExplorer works fine, in Chrome fail. Chrome version : Versión 59.0.3071.115 (Build oficial) (64 bits)

I dont know what is the problem, but i have tried in the console. onStartEvent function never is fire in my chrome.

I appreciate your valuable help.

PD. In David versión Bushell this event woks fine in my chrome version.

Thanks

pjona commented 7 years ago

@carman8910 what is your OS? On Mac with Chrome 59.0.3071.109 (Build oficial) (64 bits) it works.

RomanBurunkov commented 7 years ago

@carman8910 , I have got same 64 bit 59.0.3071.115. And it works, so I'm able to drag elements.

Does your hardware have touch screen?

Asking this, because this version has some changes for touch devices.

carman8910 commented 7 years ago

Yes has touch screeen. my OS is Windows10

RomanBurunkov commented 7 years ago

@carman8910

So probably this is the issue.

I believe this the same as: https://github.com/RamonSmit/Nestable2/issues/28

carman8910 commented 7 years ago

Yes, it's the sim problem, i have not tried touching the screen. Thanks so much

carman8910 commented 7 years ago

How can I fix this problem? or this its not possible?

RomanBurunkov commented 7 years ago

So, may be @pjona can help with that, I'm not very familiar with all that touch staff.

RomanBurunkov commented 7 years ago

I think the root cause is that the plugin turns off mouse events if it found a touch:

            var hasTouch = 'ontouchstart' in document;
            if (hasTouch) {
pjona commented 7 years ago

@RomanBurunkov @carman8910 I'll look at that

carman8910 commented 7 years ago

Ok the problem it's solved, but the functionality to TouchScreen its die. I did initialize hasTouch on false.

pjona commented 7 years ago

@carman8910 can you test this demo: https://jsfiddle.net/s5yt9mc4/2/

I tested it with mouse and on phone, but I don't have touch screen + mouse.

carman8910 commented 7 years ago

I tested the demo, this works! great job!. Mouse and touchscreen works ok

pjona commented 7 years ago

@carman8910 can you test also on Firefox?