Skip to content

Conversation

@pgorczak
Copy link

@pgorczak pgorczak commented Sep 30, 2024

This fixes #16225. Drag interactions now work on iPad without interference from the pencil hover-pointer.

I'm not sure about the comment above

// Some platforms assign a new pointerId when the target changes.

This might constitute a case where we want to track a pointermove without a preceding pointerdown as a touch. Is there a known platform we can use to test against a possible regression?

@github-actions
Copy link

📦 Preview the website for this branch here: https://deploy-preview-16242--ol-site.netlify.app/.

@ahocevar
Copy link
Member

Thanks for the fix! This might indeed interfere with the commented code section you mentioned.

The problems related to that comment were reported with iOS and older Android devices. See #13771 for the list of associated issues.

@ahocevar
Copy link
Member

On the other hand, the only thing that could happen would be that a tracked pointer gets deleted on pointerup or pointercancel, so that should not matter.

It would be good if you could add a test with the event sequence you reported in #16225, to make this pull request complete.

@ahocevar
Copy link
Member

Oh, I understand now what you probably meant. With your change, we might indeed be losing a drag sequence when the pointer id changes due to a target change. Unfortunately I was not able to reproduce the issues myself back then.

@ahocevar
Copy link
Member

ahocevar commented Sep 30, 2024

Considering all this, I think a safer fix would be to separately track touch sequences pointerover - pointermove - pointerout with a separate tracked pointers object, and ignore these sequences.

@ahocevar
Copy link
Member

@pgorczak Would you be interested in finishing this according to my comment above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drag event generation not compatible with (Apple) pencil hovering

2 participants