Skip to content

DismissiblePane cancels action if gesture direction changes during release, even when past threshold #536

@lukemmtt

Description

@lukemmtt

Description

When using DismissiblePane with swipe-to-dismiss functionality, if a user swipes past the dismissThreshold but their finger moves slightly backward before lifting, the dismissal is cancelled and the pane settles into the open action pane state (showing the action buttons) instead of executing the dismiss. This happens even when the release occurs well past the threshold. This commonly occurs when rapidly swiping multiple items in succession and differs from native iOS swipe actions where crossing the threshold guarantees the action will execute on release.

Current Behavior

  1. User swipes past the threshold (e.g., 50% for delete action)
  2. Before lifting, finger moves slightly backward (common in rapid swipes)
  3. User releases while still well past the threshold
  4. flutter_slidable cancels the dismiss and animates to show the action pane
  5. User must tap the action button or swipe again to complete the action

Interaction demo

Expected Behavior

Once the threshold is crossed, releasing should always trigger the dismiss action, regardless of finger movement during release - matching iOS native behavior.

Example of good behavior from macOS Messages app (aligns with iOS behavior):
https://github.com/user-attachments/assets/59a4f83f-cf2c-4a68-bfec-0bae99f891fa

Solution in PR #537:

Interaction demo

Reproduction Steps

  1. Create a Slidable with DismissiblePane
  2. Rapidly swipe past the dismissThreshold on multiple items
  3. Notice some swipes settle into the open action pane state when finger naturally moves backward before lifting
  4. Compare with native iOS swipe behavior which executes the action in this scenario

Impact

This creates a frustrating user experience, especially when performing batch operations where users rapidly swipe multiple items but some dismissals unexpectedly cancel and require additional interaction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions