Skip to content

iOS: sheet presentation state is slot-scoped — replacement sheets inherit predecessor hidden/dismissed state (Android fixed in mob_new #43) #115

Description

@GenericJam

mob_new PR #43 fixed this on Android by keying presentation state (visibility + exactly-once dismissal) to the sheet node's canonicalized :id, with disposal deactivation so a predecessor's late dismiss callback becomes a no-op. iOS still has the original bug: ios/MobRootView.swift ~1569 (MobSheetView) keeps @State isPresented/dismissSent slot-scoped, dispatched at ~525 — a replacement sheet (same tree position, different id) inherits hidden or already-dismissed state, so it can fail to present or have its dismissal suppressed. Reproduction recipe from the Android baseline: open sheet A, drag-dismiss while keeping the node in the tree, re-render to sheet B (different id) → B never presents. Suggested fix shape: an .id(canonicalId) keyed identity mirroring Android's semantics (explicit :id only; absent id keeps slot behavior), with the same canonical treatment of JSON id forms so cross-platform identity semantics match. Per the parity rule, until fixed this divergence should be noted in the sheet docs. Full analysis in mob_new PR #43's review.

Activity

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

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