Open mmiller-d8 opened 2 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Those do not appear to be the same. Those generally are about the drag event not firing. I have a very specific case that can be reproduced and (technically) resolved (don't change the z-index once the pan movement starts).
Description
On Android only, when you have more than one VisualElement on the page with a PanGestureRecognizer attached and you change the Z-Index on drag start, the event routing seems to get confused.
When you start to drag, you get a couple of Pan events, but then they stop. If release pressure and then start dragging again, it works normally. Probably because the ZIndex is already set, but that's just a guess.
This issue only occurs on Android. iOS works fine. If you only have one object on the page with a PanGestureRecognizer it works fine. Once you have multiple, it occasionally works as expected, but usually doesn't.
Steps to Reproduce
As an aside, if you add a TapGestureRecognizer and change the Z-Index with a tap before you start dragging, it works fine. So, it seems like changing the ZIndex once the drag has started is what is breaking it.
Also, my reproduction has a ton of extra code - I wrote custom gesture recognizers that inherit from PanGestureRecognizer to take care of all the plumbing you have to do. But - I'm writing debug output at the raw event so you can see what happens.
Edit: The raw event is handled in GestureRecognizers/PanGestureRecognizerBase.cs.
Link to public reproduction project repository
https://github.com/mmiller-d8/ApplyQueryAttributes
Version with bug
8.0.60 SR6
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 34
Did you find any workaround?
Not really. I'm trying to think of one, but it would be pretty involved - like putting a touch effect to change it before the drag actually starts, but that would be messy. Especially since the drag end might conflict with the release.
Relevant log output
No response