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

Double-clicking on a class name in HTML docs also selects the class keyword #1154

Closed
dlech opened this issue May 27, 2021 · 1 comment
Closed
Labels
Bug A bug Needed: replication Bug replication is required

Comments

@dlech
Copy link

dlech commented May 27, 2021

Problem

Double-clicking on a class name also selects the class keyword.

Reproducible Project

This can be seen on sphinx_rtd_theme's own docs.

  1. Go to: https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/api.html
  2. Double-click on test_py_module to select that word.
  3. See that class test_py_module is selected instead.

image

Expected Results

Only test_py_module should be selected.

Analysis

It appears that this happens because there is no whitespace between the HTML containing class and the HTML element containing test_py_module

@dlech dlech added Bug A bug Needed: replication Bug replication is required labels May 27, 2021
dlech added a commit to dlech/sphinx_rtd_theme that referenced this issue May 27, 2021
This fixes double-clicking to select a single word since there is no whitespace between it and the next element.

Fixes: readthedocs#1154
dlech added a commit to pybricks/pybricksdev that referenced this issue May 27, 2021
In the rendered html docs, double-clicking a name, such as a class name,
would select both the keyword "class" as well as the class name. This
happens because there is no whitespace between the two HTML elements.
We can patch this by injecting a space using CSS.

Issue: readthedocs/sphinx_rtd_theme#1154
@Blendify
Copy link
Member

This patch did not solve the issue for me, tested on Brave (Chrome based).

This issue would be better resolved by reporting the issue to sphinx, a space should be added by default.

@dlech dlech closed this as completed Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug Needed: replication Bug replication is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants