Skip to content

Safari doctests selections doesn't work  #9098

@V0lantis

Description

@V0lantis

Describe the bug
A clear and concise description of what the bug is.
The doctest selection isn't working properly on Safari, see below :
On Chrome :
Capture d’écran 2021-04-10 à 16 59 58

On Safari :
Capture d’écran 2021-04-10 à 17 04 35

This is because of https://stackoverflow.com/questions/34372056/how-to-make-user-select-work-for-safari-browser/34372191#34372191

I believe the issue lay in ./sphinx/themes/basic/static/basic.css_t:774: :

table.highlighttable td.linenos,
span.linenos,
div.doctest > div.highlight span.gp {  /* gp: Generic.Prompt */
    user-select: none;
}

To revole the issue, it should be :

table.highlighttable td.linenos,
 span.linenos,
 div.doctest > div.highlight span.gp {  /* gp: Generic.Prompt */
   user-select: none;
   -webkit-user-select: text; /* Safari fallback only */
   -webkit-user-select: none; /* Chrome/Safari */
   -moz-user-select: none; /* Firefox */
   -ms-user-select: none; /* IE10+ */
 }

To Reproduce
Steps to reproduce the behavior:
Just go to http://scipy.github.io/devdocs/tutorial/linalg.html#numpy-matrix-vs-2-d-numpy-ndarray
with safari and try to select the doc code. We shouldn't be selecting the >>> as in Chrome

I try to resolved it myself to make a PR, but I wasn't able to reproduce the behavior on the generated doc.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions