Skip to content

Conversation

Copy link

Copilot AI commented Nov 5, 2025

When an element has both Touch.Command and Touch.LongPressCommand, the tap command was incorrectly executing alongside the long press command.

Changes

  • Added m_longPressDetected flag to TouchEffectTapGestureRecognizer to track long press state
  • Modified TouchesEnded to skip tap command execution when long press is detected
  • Added NotifyLongPress() method to set the flag when long press is recognized
  • Reset flag in TouchesBegan, TouchesEnded, and TouchesCancelled to ensure clean state

This ensures only the appropriate command executes based on the gesture performed.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix touch command to prevent execution during long press [iOS] Fixed Touch.Command execution during long press Nov 5, 2025
Copilot AI requested a review from Vetle444 November 5, 2025 09:59
@Vetle444 Vetle444 closed this Nov 5, 2025
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.

2 participants