Skip to content

Misleading behavior when setting at to 0 #1611

@mathias-ewald

Description

@mathias-ewald

By @kermanx:

The current behavior when setting at to 0 on magic-move and v-switch is quite misleading. Setting at to 0 should means this first state shows without a click, but currently it shows the second state and skips the first state. Because changing the behavior will be a breaking change, a warning should be made when 0 is set, and the at value should fall back to 1.


Original content:

Describe the bug

As magic-move transitions through different versions of the code block, it is not possible to render HTML in lock step. V-click or v-switch elements, given the correct at attribute, do not show at the expected click.

To Reproduce
Steps to reproduce the behavior:

  1. Run the example in the code pasted below
  2. On click, I would expect the 2nd block of code to show together with template 1
  3. See how that's not the case

slides.md

Desktop (please complete the following information):

  • OS: MacOS Sonoma 14.5
  • Browser: Firefox
  • Slidev version: 0.49.3

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions