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

Overlay preventing copying full line #90

Open
GuyNachshon opened this issue May 28, 2023 · 2 comments
Open

Overlay preventing copying full line #90

GuyNachshon opened this issue May 28, 2023 · 2 comments
Labels
invalid This doesn't seem right

Comments

@GuyNachshon
Copy link
Collaborator

When double-clicking a line to highlight it, if overlay exists it prevents you from copying the entire line on double click.

Example

Possible solutions:

  • add copy icon at the end of the line
  • using the pseudo-selector ::select
  • javascript solution - though it is messy and not intuitive to support:
const parentElement = document.getElementById('parentElement'); 
parentElement.addEventListener('dblclick', function(event) {event.stopPropagation();});
@GuyNachshon GuyNachshon added the invalid This doesn't seem right label May 28, 2023
@baruchiro
Copy link
Collaborator

I suggest more research here. First, I think the "triple click" is an Operating System feature and not a browser feature.

As you can see in your example, down in the same answer, there is another code element with span inside it, and it is selected as expected.
We need to understand what breaks the selection.
See an example of missing an inline-block that breaks the selection: http://jsfiddle.net/1jupqmng/1/

Reference: https://stackoverflow.com/questions/4687941/how-do-i-control-triple-click-highlighting-html

@baruchiro
Copy link
Collaborator

Also, preventing searching the line text, don't know if it is important.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants