Skip to content

fix: refresh fixed back-button coordinates if viewport changes before transition #143

Description

@rdlabo

The fixed back button uses coordinates captured when the transition animation is constructed. If the viewport changes before playback starts, the button can appear at its previous position.

Observed while reviewing #142 (src/transition/ios.transition.ts, animateFixedBackButton). This is low priority and deferred; no implementation change is requested as part of #142.

Reproduction

  1. Use an RTL page with one ion-back-button in the start slot.
  2. Construct the push transition at a viewport width of 390px.
  3. Change the viewport width to 600px before starting the animation.
  4. Start the animation and inspect the fixed button position.

Observed result

The expected horizontal center moves from 352px to 562px, but the fixed button stays at approximately 352px: a 210px error. The same LTR test has no horizontal error because the start button remains anchored to the left.

This was reproduced by deliberately resizing between construction and playback. Occurrence during ordinary navigation has not been established.

Expected behavior

The fixed back button should use the current viewport position when playback starts. Consider measuring its coordinates immediately before applying the fixed overlay, while preserving push/pop behavior and interactive cancellation.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions