<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>244448</bug_id>
          
          <creation_ts>2022-08-28 04:20:18 -0700</creation_ts>
          <short_desc>Should &lt;button&gt; have `user-select: none;` by default?</short_desc>
          <delta_ts>2023-02-13 00:33:13 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=208677</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Valtteri Laitinen">dev</reporter>
          <assigned_to name="Karl Dubost">karlcow</assigned_to>
          <cc>dev</cc>
    
    <cc>karlcow</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1894299</commentid>
    <comment_count>0</comment_count>
    <who name="Valtteri Laitinen">dev</who>
    <bug_when>2022-08-28 04:20:18 -0700</bug_when>
    <thetext>The user agent style sheet includes `user-select: none;` for &lt;input type=&quot;button&quot;&gt; but not for &lt;button&gt;. Should we add `user-select: none;` to &lt;button&gt; 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 &lt;button&gt;Bar&lt;/button&gt; Baz
2. Here the button text is unselectable: data:text/html,Foo &lt;input type=&quot;button&quot; value=&quot;Bar&quot;&gt; Baz

Other browsers:
• Neither &lt;button&gt; or &lt;input type=&quot;button&quot;&gt; is selectable in Firefox.
• Chromium behaves like WebKit here: https://crbug.com/1356522</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894301</commentid>
    <comment_count>1</comment_count>
    <who name="Valtteri Laitinen">dev</who>
    <bug_when>2022-08-28 04:50:41 -0700</bug_when>
    <thetext>In fact, there’s no `user-select: none;` for &lt;input type=&quot;button&quot;&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894391</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-08-28 22:35:17 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894392</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-08-28 22:35:48 -0700</bug_when>
    <thetext>&lt;rdar://problem/99262559&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894393</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-08-28 22:37:55 -0700</bug_when>
    <thetext>This should be probably filed as a spec issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894395</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-08-28 22:45:31 -0700</bug_when>
    <thetext>I filed https://github.com/whatwg/html/issues/8228</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1900858</commentid>
    <comment_count>6</comment_count>
    <who name="Valtteri Laitinen">dev</who>
    <bug_when>2022-09-24 05:10:59 -0700</bug_when>
    <thetext>Note the css-ui spec [1] includes the following:

&gt; The following additions are made to the UA stylesheet for HTML:
&gt; button, meter, progress, select { user-select: none; }
[1] https://drafts.csswg.org/css-ui/#issue-5d851d49 (just before the inline issue)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1933095</commentid>
    <comment_count>7</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-02-13 00:12:44 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/10017</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>