Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instant Previews disable content tabs #7408

Closed
4 tasks done
lampensau opened this issue Aug 1, 2024 · 6 comments
Closed
4 tasks done

Instant Previews disable content tabs #7408

lampensau opened this issue Aug 1, 2024 · 6 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@lampensau
Copy link

Context

No response

Bug description

Using the instant preview feature on a document heading that includes a content tab will disable the content tabs inside the section after previewing (hovering) the link.

Initial state:
Content tabs are active; content is visible

After hovering the preview link:
grafik

To view a content tab's content again, the user must click its heading or reload the page, making the content much easier to overlook.

Related links

Reproduction

9.5.30+insiders.4.53.11-instant-preview-disables-tabs.zip

Sidenote: Why does the mkdocs-material-insiders repository currently report the 9.5.29 as latest version?

Steps to reproduce

  1. Install and enable material insiders theme
  2. Enable and configure the Markdown extensions pymdownx.superfences, and pymdownx.tabbed using the alternate_style
  3. Use the instant preview feature to a document heading containing one or multiple content tabs. Content tabs only get disabled if the instant preview tooltip includes them.

Note: I found no real difference between the different options to enable instant previews; the minimal reproduction uses the method relying on the attr_list Markdown extension.

Browser

Chrome, Edge, Firefox

Before submitting

@squidfunk squidfunk added the needs investigation Issue must be investigated by the maintainers label Aug 1, 2024
@squidfunk
Copy link
Owner

Thanks for reporting. Confirmed. I'll look into it.

@squidfunk squidfunk added bug Issue reports a bug and removed needs investigation Issue must be investigated by the maintainers labels Aug 1, 2024
@squidfunk
Copy link
Owner

Fixed in 1e58ebecc. The problem was that for content tabs on the same page there were elements with the same id, and if the preview comes before those content tabs, it influenced the actual content tabs. Content tabs should now work as expected inside previews. Can you confirm? Please note that this is still an experimental feature.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Aug 1, 2024
@lampensau
Copy link
Author

Appreciated!

@lampensau
Copy link
Author

I think I found another (edge-) case?

Using the anchor link configuration for pymdownx.tabbed will still disable the content tabs when using the link preview:

markdown_extensions:
  - pymdownx.tabbed:
      slugify: !!python/object/apply:pymdownx.slugs.slugify
        kwds:
          case: lower

@squidfunk
Copy link
Owner

Could you please create another issue with a minimal reproduction? You can keep the issue itself brief, just link to this issue for context.

@squidfunk
Copy link
Owner

Released as part of 9.5.31+insiders-4.53.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants