Skip to content

Code/Manual tab buttons unresponsive in Safari #23

@mp-c0de

Description

@mp-c0de

Description

The toggle buttons on component documentation pages do not respond to clicks when using Safari. They work correctly in Chrome.

Affected buttons:

  • Preview / Code toggle at the top of the component preview card
  • CLI / Manual toggle in the Installation section

Steps to reproduce

  1. Open Safari
  2. Navigate to any component docs page, e.g. /docs/components/button
  3. Click the Code button at the top of the preview card → nothing happens
  4. Click the Manual tab in the Installation section → nothing happens
  5. Same actions work correctly in Chrome

Expected behaviour

Clicking the buttons should toggle the displayed content (preview ↔ source code, CLI install ↔ manual install).

Environment

  • Browser: Safari (macOS)
  • OS: macOS

Possible cause

The tabs use Leptos reactive signals (current_tab.get()) with conditional display: block/none styling. There is even a TODO comment in app/src/domain/markdown_ui/components/static_demo_wrapper.rs:141:

// TODO 🚑 Show does not work at the moment. Using display as shortfix solution.

This suggests there is a known issue with <Show> which prompted the workaround. The current workaround may have additional issues in Safari around hydration or event handler binding that don't appear in Chrome.

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