components
components copied to clipboard
fix(drag-drop): fix drag start delay behavior to allow scrolling (#16224)
I tried fixing the scrolling issue on mobile devices with my previous PR (#16228), but it did not work on iOS. There was also a bug with scrolling after the item has been dragged once. The native drag interactions were not toggled when the drag sequence is ended.
In order to fix the iOS issue, we prevent default behaviour of pointer events fired after the drag sequence has been started instead of only initialized.
Actually it seems like there is an issue with my solution. Sometimes, when you drag, it scrolls.
@Aboisier, @crisbesto: at the moment, scrolling is not possible on iOS devices if cdkDragDelay
is set and the touch starts on an element with cdkDrag
. This is IMHO a real problem, as screen-filling drag items now prevent the user from using the page, as they can not scroll. Not setting cdkDragDelay
is obviously not really a fix.
@Aboisier: Whats the state of this PR? Can I help you somehow? Are you still working on fixing the drag scroll behavior you mentioned in your last comment?
Edit: for everyone else: use a DragHandle
to work around this problem!
Hey @trampi , I don't think I will work on this PR in the near future. It seems like a change has been introduced between 8.0.2 and 8.1.0 and it's breaking my fix, so we are currently using a fork of 8.0.2 on which we applied #16228 and this PR. It's kind of stableish.
You're welcome to continue the work on this PR!
Hi @Aboisier, I would love to but I lack the time, experience and knowledge about CDK. Thank you for your feedback!
@crisbeto Can this fix be finished in order to fix this issue https://github.com/angular/components/issues/17923