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

Search and menu scroll broken when using pymdownx.tabbed content #3327

Closed
5 tasks done
svenhofstede-zz opened this issue Dec 10, 2021 · 1 comment
Closed
5 tasks done

Comments

@svenhofstede-zz
Copy link

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When using pymdownx.tabbed content, an javascript error is thrown after version 8.0.0 onwards

Related issue is #3324 but I'm providing steps to reproduce here.

Expected behaviour

Search should work. Scrolling menu on the left should work

Actual behaviour

  • Clicking on search or typing does not result in search results popdown.
  • Menu bar on left losing ability to scroll
  • Javascript error in console
index.ts:77 Uncaught ReferenceError: Missing element: expected ".tabbed-labels" to be present
    at z (index.ts:77)
    at $o (index.ts:97)
    at index.ts:98
    at Array.map (<anonymous>)
    at Po (index.ts:98)
    at bundle.ts:202
    at Array.map (<anonymous>)
    at bundle.ts:202
    at e._subscribe (defer.ts:53)
    at e._trySubscribe (Observable.ts:244)

Steps to reproduce

mkdocs.yaml

site_name: example
theme:
  name: material
plugins:
  - search
nav:
  - example: example.md
markdown_extensions:
  - pymdownx.tabbed

docs/example.md

=== "Some block one"

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua.
    
=== "Some other block"

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua.

docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material:7.3.6

🔴

docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material:8.0.0

Package versions

  • Python: Python 3.9.2
  • MkDocs: 1.2.3
  • Material: 8.0.0

Configuration

site_name: example
theme:
  name: material
plugins:
  - search
nav:
  - example: example.md
markdown_extensions:
  - pymdownx.tabbed

System information

  • Operating system: Tested on Mac OS and Windows
  • Browser: Tested on Chrome, Safari, Edge
@squidfunk
Copy link
Owner

Thanks for reporting. Intended behavior, as Material for MkDocs dropped support for the legacy style. When doing major upgrades, it's a good idea to check the upgrade guide 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants