Open Bug 611311 Opened 15 years ago Updated 5 months ago

Make the Escape key a modifier key to allow selection of text in links

Categories

(Core :: DOM: UI Events & Focus Handling, enhancement)

enhancement

Tracking

()

People

(Reporter: jwatt, Unassigned)

Details

Using the mouse to select text in (or starting in) link text is a pain. Mousing down and dragging will drag the link instead of selecting the text. Trying to double click on a word in a link and drag to do multi-word select will actually activate the link. How about allowing the user to hold down the Escape key during these mouse interactions to escape the default link drag/activate behavior?
Would this affect the various uses of the ESC key as keyboard shortcut? It's different from Shift or Ctrl in that regard.
We can select the text in hyper link with Alt key (Alt key + mouse down and drag). Unfortunately, Alt key up will trigger saving the page if mouse cursor is on a link. I guess that the latter is a bug. But isn't the former enough? I.e., shouldn't we just fix the Alt key up's problem?
rsx11m: are there any you can think of where the interaction would be bad? Masayuki: maybe. Is that the intended affect of the Alt key, or just a side affect of a preventDefault() call to get alt+click to do a save-as? The Escape key seemed more natural to me to escape/prevent the default behavior; I associate other modifiers with providing alternate behavior (such as saving rather than loading) rather than just preventing behavior. Using Escape certainly seems more natural than running through the modifier keys one at a time to figure out if one of them would let me do what I wanted.
(In reply to comment #3) > rsx11m: are there any you can think of where the interaction would be bad? I'm wondering if the proposed functionality would "steal" the focus of the ESC key where it's used for other functions, e.g., stopping a web site from loading or closing the Find bar if it's open (or any other dialog for that matter).
I really think it is a UI decision for which key to use (or if a key combination should be used at all)
>But isn't the former enough? I.e., shouldn't we just fix the Alt key up's >problem? Changing the upclick behavior for using alt with a drag operation works for me
FYI: Alt+Dragging causes to open menubar at releasing Alt key. That is bug 261715. I posted a patch to the bug.
1) It doesn't necessitate the Escape key. Another possibility is to have the middle mouse button (or right mouse button) to select text on links. The middle mouse button currently opens the link in a new tab, after a middle mouse button mouse-down, dragging, and a mouse-up. I think its behavior should be to open a link in a new tab only when clicking on the link, not when doing mouse-down,drag, and mouse-up. Therefore the middle mouse button click and drag can be used for selecting text on links where it is not possible with the left(or default) mouse-button. This will also allow a using a double click with the middle mouse button to select a word. 2) Another possibility is to not have a modifier key or button: A left mouse button down, and a drag will select text, not the link, if the mouse down location was at the upper side of the word (for example, a quarter of the letter or text height from the bottom, and up). If the mouse down location was at the lower side of the word (up to a quarter of the height from the bottom), closer to the link underline marker. Note that some websites do not use the underline "hint" for links (for example news sites, where a header can be a link), so the user will need to have some cue that the link, or on the other hand the text, is going to be dragged, or selected, respectively. 3) It has been almost a year, without any progress on this very annoying bug, can it be assigned to someone to fix it? It is one of the most annoying bugs on Firefox (and other browsers) for me. 4) Why was it marked as an enhancement? It is a bug because it doesn't allow the normal behavior: selecting text easily on links, as is done in regular text areas of the page. 5) The ALT key behavior (see comment #2) is still wrong in my opinion (using nightly). It should save the link page only on Alt+click, but it saves the page after "Alt + mouse-down + drag + mouse-up" instead of only selecting text when dragging when the Alt key is pressed.
> If the mouse down location was at the lower side of the word (up to a > quarter of the height from the bottom), closer to the link underline marker. Correction, that should read: "The link should be dragged, if the mouse down location If the mouse down location was at the lower side of the word (up to a quarter of the height from the bottom), closer to the link underline marker. "
(In reply to nivtwig from comment #9) > 3) It has been almost a year, without any progress on this very annoying > bug, can it be assigned to someone to fix it? It is one of the most annoying > bugs on Firefox (and other browsers) for me. Perhaps you could fix this bug? :) Would be great to get this fixed.
FYI, I've posted a WIP patch in bug 50673 that implements link selection using Shift+press + dragging.
Component: Event Handling → User events and focus handling
Severity: normal → S3

Will this work with Sticky Keys?

You need to log in before you can comment on or make changes to this bug.