cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sfink
Employee
Employee
Status: New idea

I often have a problem where I want to cut & paste link text. But if I click and drag, it tries to drag the whole link (and dropping it into eg a terminal will paste the URL, so I can't even edit it down). That's fine for default behavior, but I'd really like an easy way to disable the linkiness.

Ctrl-drag and shift-drag are already used. I will suggest Ctrl-shift-drag. For a bonus, while ctrl-shift is pressed it should unstyle all links on the page, or otherwise indicate that things are no longer clickable.

In case it's unclear: if I have the HTML <a href="https://example.com">some juicy text</a>, I want a way to select the word "juicy" with my mouse rather than starting to drag the link.

Right now, I try to find a place to start dragging that is past the link, then drag back to select starting at the beginning of the substring I care about. This is very error-prone and difficult, especially when there is another link right after the first. (Also, it may include a suffix I don't want.)

Perhaps there's an obvious workaround that I don't know about?

 

3 Comments
sfink
Employee
Employee

Ah. It looks like holding Alt works—if you haven't bound Alt-drag to move a window via your window manager, as I have.

Apparently Ctrl-Alt-drag also works. But in addition to selecting the text, it also follows the link (opening it in a new tag because of the Ctrl.) Or it selects everything in the page up to that point, or after that point, I'm not sure what's going on.

Anonymous
Not applicable

I use Copy Link Text as a workaround.

inthewired
New member

good find with the ctrl+alt+drag technique, and it lead to the solution: the ctrl+alt+drag method can highlight the text without opening the hyperlink if you release the ctrl key before releasing the drag/mouse click

hope this works for you sfink and thank you for making this post 🙂

(my window manager also moves the whole window with alt-drag)

*update/explaination: you can release ctrl at any time once youve begun dragging, as long as its after the drag has begun and before it has ended. it seems to work like this:

ctrl+click according to browser = [open link as new background tab]

alt+drag according to browser = [highlight link text]

alt+drag according to the window manager = drag window

by holding ctrl+alt the window manager ignores the drag, and the browser receives both the start of a ctrl+click and the alt+drag, but letting go of the ctrl button prior to releasing the mouse  click, the ctrl part gets dropped/ignored completely and the alt+drag becomes the only action being performed

as a side note, in chromium the ctrl+alt+drag technique will not open the link as a background tab even if the ctrl button is still held down when the drag is released, but instead will only do that if instead the alt key is released before ending the drag, and weirder still on both browsers if BOTH keys are lifted before the drag ends, then the link becomes normal clicked! interesting stuff!