-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scheduler drag and drop with mobile support #1395
Conversation
I am afraid we can't accept a PR that introduces a third party js dependency. And just including the file in Radzen.Blazor.js isn't an option either - both license wise and size-wise. Radzen already includes drag and drop implementations and we don't want another one - RadzenSlider, RadzenColorPicker and RadzenDialog use drag and drop. |
In this case, I will investigate further |
I think HTML5 drag and drop works out of the box on latest mobile devices. That's what this page claims https://caniuse.com/dragndrop Perhaps the implementation you suggested needs a little tweaking to make it work on a mobile device (without a polyfil or a brand new drag and drop implementation). |
Thanks for the suggestion. I will look into it. However the reason I decided to use the third-party implementation was because, it fixes the ontouchend event firing and the dragging animation. |
You can add a method or two if needed to Radzen.Blazor.js. Also check if some of the existing code would help - there is drag and drop in the splitter, datagrid, slider, dialog etc. |
I think I've completed the implementation - removed touch events and the polyfill. It seems setting ondragstart as a string was the only thing required to enable drag and drop on mobile devices. |
All issues should be resolved now. Tested touch support on Android and on Chrome dev tools for mobile.
Had to use DragDropTouch.js with a little modification described here
It is currently added as a separate DragDropTouch.js file, but you might want to integrate it inside Radzen.Blazor.js
Поздрави