Skip to content

fix(drag-drop): fix drag start delay behavior to allow scrolling (#16224) #16537

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

Closed
wants to merge 1 commit into from

Conversation

Aboisier
Copy link
Contributor

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.

@Aboisier Aboisier requested a review from crisbeto as a code owner July 16, 2019 18:06
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 16, 2019
…ular#16224)

The current implementation of the drag start delay does not allow scrolling on iOS devices.
Also, once the element has been scrolled once, the scrolling is never reenabled.

In order to fix this issue, we prevent default behaviour of pointer events fired after
the drag sequence has been started instead of initialized. Also, we toggle native
drag interactions when the drag sequence is ended.
Aboisier pushed a commit to cactusoft-ca/components that referenced this pull request Jul 16, 2019
@Aboisier
Copy link
Contributor Author

Actually it seems like there is an issue with my solution. Sometimes, when you drag, it scrolls.

@trampi
Copy link

trampi commented Aug 8, 2019

@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!

@Aboisier
Copy link
Contributor Author

Aboisier commented Aug 9, 2019

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!

@trampi
Copy link

trampi commented Aug 13, 2019

Hi @Aboisier, I would love to but I lack the time, experience and knowledge about CDK. Thank you for your feedback!

@plchampigny
Copy link

@crisbeto Can this fix be finished in order to fix this issue #17923

@andrewseguin andrewseguin removed the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 28, 2021
@josephperrott josephperrott added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed needs rebase labels Nov 16, 2022
@mmalerba mmalerba self-assigned this Dec 11, 2024
@josephperrott josephperrott requested review from a team as code owners December 18, 2024 17:40
@josephperrott josephperrott requested review from amysorto and removed request for a team December 18, 2024 17:40
@mmalerba
Copy link
Contributor

mmalerba commented Jan 8, 2025

Closing since the relevant issue (#17923) has already been fixed

@mmalerba mmalerba closed this Jan 8, 2025
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants