-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Holding Option/Alt does not allow selection of text inside Link #6614
Comments
From what I see, Option+click on a native link does immediately trigger a download. So this is behaving correctly. I don't see anything about Option+click being used for selection, I think that may be a convenient side effect. This also only happens in Chrome and Firefox. In Safari it starts a drag event. The drag event issue is tracked here #6618 A workaround does exist, you can copy the text in a link by right clicking. I'm not fully convinced this is a bug, I think we can consider this to be normalization across browsers. We will need more opinions. |
@snowystinger Yeah. This does not seem to be defined by a standard and every browser uses a slightly different implementation.
Happens in Chromium-based browsers and Safari but not in Firefox. I might not have been clear here but I was also referring to
I doubt it's a side-effect but an explicit choice. According to https://superuser.com/a/940347 it seems to have been implemented in Chromium 52 after it worked like this for some time in Firefox already. Safari/WebKit seems to be the only browser not implementing it this way.
Maybe fixing this would already fix also the selection issue in other browsers.
Seems to work in Chromium-based browsers only. In Safari it selects the text of the link on right click but doesn't give me an option to copy that text in the context menu. I could press Edge/Chromium
I'm not asking for getting this re-implemented so it even works in Safari but rather that React Aria does not prevent it from happening (if possible). |
Definitely not arguing to reimplement it. This is already in a really tough bit of code. It will be hard to even try not blocking it. I do not know that it's possible how things are currently implemented. Thanks for looking up the additional information. |
Provide a general summary of the issue here
While holding Option/Alt, you can usually select text inside links without triggering them.
🤔 Expected Behavior?
Being able to select text while holding Option/Alt like on native links.
Also the link should neither be followed nor a download should be triggered.
😯 Current Behavior
No selection possible, also the link gets triggered as soon as you lift the mouse button.
When keeping Option/Alt pressed, it triggers a download of the link, otherwise it navigates.
💁 Possible Solution
No response
🔦 Context
No response
🖥️ Steps to Reproduce
Hold
Option
while trying to select the text of the RAC Link and then the native link.https://codesandbox.io/p/sandbox/crazy-hooks-sfs3lr
RAC.Select.Link.mp4
Version
React Aria Components 1.2.1
What browsers are you seeing the problem on?
Microsoft Edge
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
The text was updated successfully, but these errors were encountered: