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

navigation.tracking overrides progress of IDs outside of table of contents #3599

Closed
5 tasks done
Dup4 opened this issue Feb 21, 2022 · 3 comments
Closed
5 tasks done
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@Dup4
Copy link

Dup4 commented Feb 21, 2022

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

iShot2022-02-21.10.04.03.mp4

When I enable both navigation.tracking and content.code.annotate.

Later, when I want to get a link to one of the lines in the code block, the url in the url bar will immediately become the url of the title of the current content.

This prevents me from getting a link to one of the lines in the code block.

So is this as expected?

Expected behaviour

When I select a line in the code block, the url should point to that line's anchor, unless when I move on, the anchor should change to the current heading's anchor.

Actual behaviour

already explained in the Description.

Steps to reproduce

I found that in the official documentation it can be reproduced.

iShot2022-02-21.10.12.49.mp4

Package versions

  • Python: python --version
  • MkDocs: mkdocs --version
  • Material: pip show mkdocs-material | grep -E ^Version

image

Configuration

Enable navigation.tracking and content.code.annotate.

System information

  • Operating system: ...
  • Browser: ...

image

image

@squidfunk
Copy link
Owner

Thanks for reporting. This is not related to content.code.annotate, but to the newly added line anchors support.

@squidfunk squidfunk changed the title navigation.tracking will conflict with content.code.annotate navigation.tracking overrides progress of IDs outside of table of contents Feb 21, 2022
@squidfunk squidfunk added the bug Issue reports a bug label Feb 21, 2022
@squidfunk
Copy link
Owner

Fixed in 8deb1c2. Clicks on anchors shouldn't trigger navigation tracking anymore.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Feb 26, 2022
@squidfunk
Copy link
Owner

Released as part of 8.2.2.

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