-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make <summary> unselectable by default #3191
Comments
There are also some discussions in w3c/i18n-drafts#123. |
I don't think we use |
I think this might be in the realm of browser UX, not spec. E.g. a browser could require dragging further than normal to start a selection from inside a summary element. The actual process of mouse down/move/up translation to selection is the problem here, not selection itself. (For example, we should not prevent keyboard selection or "Select all" or dragging to select everything in a large swathe of the page which contains a single details/summary.) And that translation process is a browser UX design issue, not a spec issue. |
@xfq In w3c/i18n-drafts#123 you noted that links don't have this problem. What's different about links vs summary that makes one a problem and the other not? And could that difference be implemented in UAs, instead of making them unselectable? (Fwiw I agree with @domenic and @annevk that disabling selection isn't the right solution here, improving browser UX is.) |
The unwanted selection appears because of the short interval between the two clicks, which is treated by the browser as a double-click, not because the cursor moves. Indeed this looks like a bug/omission in browsers for not accounting for this scenario. |
When expanding/collapsing the
<details>
element, it's really easy to select the text in the<summary>
element accidentally when expanding and collapsing a section quickly (just for a quick short look at the section, for example), which is annoying.Personally, I'd like to see the selection of the
<summary>
element disabled by default, but I'm also glad to hear other people's comments on this suggestion.Bugs in browsers:
The text was updated successfully, but these errors were encountered: