Skip to content

FIX: inactive touch driving invalid synthetic click on state reset#2349

Draft
MorganHoarau wants to merge 2 commits intodevelopfrom
fix/uum-100125/inactive-touch-drive-phantom-click-on-state-reset
Draft

FIX: inactive touch driving invalid synthetic click on state reset#2349
MorganHoarau wants to merge 2 commits intodevelopfrom
fix/uum-100125/inactive-touch-drive-phantom-click-on-state-reset

Conversation

@MorganHoarau
Copy link
Collaborator

@MorganHoarau MorganHoarau commented Feb 18, 2026

Description

Attempt to address UUM-100125 (phantom click after device rotation).

Issue:

  • After rotation, InputSystem queue a device configuration event which causes InputActionState to run initial-state catch-up in OnBeforeInitialUpdate. (See Comments To Reviewers section for overview)
  • Touch position state can still be non-default after touch end (because position is dontReset = true).
  • That stale state (non-default) can be treated as fresh actuation and trigger unexpected callbacks.

Changes

  • Added a guard in initial-state check to skip replay for inactive touch state.
  • Added regression test: Actions_InitialStateCheckAfterConfigurationChange_DoesNotTriggerForInactiveTouch

Draft concern:

  • Existing test Actions_WithMultipleCompositeBindings_WithoutEvaluateMagnitude_Works(true) expects prior behavior and currently fails with the guard.
  • This may represent legacy expected behavior, or a previously invalid scenario; needs team alignment.
    • Should inactive persisted touch state be replayed?
    • Or should replay be limited to semantically active touch state only (aka when TouchState.isInProgress is true)?

TODO:

  • Align with the team on the expected behavior
  • Check existing documentation around the topic (Touch, device configuration event, dontReset) - need update?
  • Changelog

Testing status & QA

  • Reproduced issue in repro project.
  • Added new regression test for this bug path.
  • Ran existing tests and identified conflict with: Actions_WithMultipleCompositeBindings_WithoutEvaluateMagnitude_Works(true)

Overall Product Risks

  • Complexity: Low
  • Halo Effect: Medium

Comments to reviewers

Tracing the whole flow can help understand the broader context. DeviceConfigurationEvent flow diagram:

flowchart TD
    subgraph Native["Native / Backend"]
        A[Device rotates]
        B[Queue DeviceConfigurationEvent]
    end

    subgraph IM["InputManager"]
        C[Process DeviceConfigurationEvent]
        D[NotifyConfigurationChanged]
        E[InputActionState.OnDeviceChange ConfigurationChanged]
    end

    subgraph IASResolve["InputActionState.Resolve phase"]
        F[Full binding re-resolve]
        G[Set initialStateCheckPending = true]
    end

    subgraph IASInitial["InputActionState.OnBeforeInitialUpdate"]
        H[Loop bindings and controls]
        I{Control belongs to TouchControl?}
        J{touch.isInProgress?}
        K[Default CheckStateIsAtDefault path]
    end

    subgraph OldPath["Old behavior"]
        L[SignalStateChangeMonitor for inactive touch]
        M[Started/Performed from stale touch state]
        N[Phantom UI click]
    end

    subgraph NewPath["Current proposed fix"]
        O[Skip inactive touch control]
        P[No synthetic Started/Performed]
        Q[No phantom UI click]
    end

    A --> B
    B --> C
    C --> D
    D --> E
    E --> F
    F --> G
    G --> H
    H --> I
    I -- no --> K
    I -- yes --> J
    J -- yes --> K
    J -- no old --> L
    L --> M
    M --> N
    J -- no new --> O
    O --> P
    P --> Q
Loading

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

Add ShouldSkipInitialStateCheck and use it in InputActionState's initial-state loop to avoid treating preserved touch data as actuated during binding re-resolution.
@MorganHoarau MorganHoarau changed the title Fixes inactive touch driving invalid synthetic click on state reset FIX: inactive touch driving invalid synthetic click on state reset Feb 18, 2026
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.

1 participant

Comments