The user agent style sheet includes `user-select: none;` for <input type="button"> but not for <button>. Should we add `user-select: none;` to <button> for consistency? Or is there a good reason for the inconsistency? To reproduce: 1. Open the following URL and see how the button text is selectable: data:text/html,Foo <button>Bar</button> Baz 2. Here the button text is unselectable: data:text/html,Foo <input type="button" value="Bar"> Baz Other browsers: • Neither <button> or <input type="button"> is selectable in Firefox. • Chromium behaves like WebKit here: https://crbug.com/1356522
In fact, there’s no `user-select: none;` for <input type="button"> in the user agent style sheet, but the text is magically unselectable and cannot be made selectable with CSS. Also, WebKit doesn’t support the unprefixed `user-select` so `-webkit-user-select` must be used.
There is a bug open on Firefox about selection and button https://bugzilla.mozilla.org/show_bug.cgi?id=1763744 which was opened because of this webcompat issue. https://github.com/webcompat/web-bugs/issues/102132
<rdar://problem/99262559>
This should be probably filed as a spec issue.
I filed https://github.com/whatwg/html/issues/8228
Note the css-ui spec [1] includes the following: > The following additions are made to the UA stylesheet for HTML: > button, meter, progress, select { user-select: none; } [1] https://drafts.csswg.org/css-ui/#issue-5d851d49 (just before the inline issue)
Pull request: https://github.com/WebKit/WebKit/pull/10017