<?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>236981</bug_id>
          
          <creation_ts>2022-02-21 10:19:35 -0800</creation_ts>
          <short_desc>[iOS] Crash when selecting the &quot;Take Photo&quot; file picker menu item if the app doesn&apos;t have the necessary entitlements</short_desc>
          <delta_ts>2022-02-26 22:47:18 -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>HTML Editing</component>
          <version>Safari Technology Preview</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 14</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="alexhsu">weaksdfg</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1844256</commentid>
    <comment_count>0</comment_count>
    <who name="alexhsu">weaksdfg</who>
    <bug_when>2022-02-21 10:19:35 -0800</bug_when>
    <thetext>Individual attributes &quot;capture&quot; can&apos;t disable the &quot;take photo&quot; on IOS
but Android can disable this
https://stackoverflow.com/questions/23234596/how-to-disable-capture-when-upload-image-file-using-safari-on-ipad</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1845358</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-23 15:37:30 -0800</bug_when>
    <thetext>&lt;rdar://problem/89382404&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1845382</commentid>
    <comment_count>2</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2022-02-23 15:51:08 -0800</bug_when>
    <thetext>The &quot;Take Photo&quot; action is displayed whenever image types are accepted by the file input, and is independent of the &quot;capture&quot; attribute. The spec doesn&apos;t say that we should exclude such an option if &quot;capture&quot; is not specified.

Can you elaborate on why you want to disable this action?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1845580</commentid>
    <comment_count>3</comment_count>
    <who name="alexhsu">weaksdfg</who>
    <bug_when>2022-02-24 04:32:08 -0800</bug_when>
    <thetext>(In reply to Aditya Keerthi from comment #2)
&gt; The &quot;Take Photo&quot; action is displayed whenever image types are accepted by
&gt; the file input, and is independent of the &quot;capture&quot; attribute. The spec
&gt; doesn&apos;t say that we should exclude such an option if &quot;capture&quot; is not
&gt; specified.
&gt; 
&gt; Can you elaborate on why you want to disable this action?

sir,
The file input is not of type picture, but &quot;Photo&quot; still shows up, then
Clicking &quot;take a photo&quot; on an html page will crash the app, even if the app doesn&apos;t have permission to open the camera.
My project has webview in an APP, happens as described earlier.

So I think there has to be a feature to disable it off</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1845865</commentid>
    <comment_count>4</comment_count>
    <who name="Aditya Keerthi">akeerthi</who>
    <bug_when>2022-02-24 17:59:12 -0800</bug_when>
    <thetext>(In reply to alexhsu from comment #3)
&gt; (In reply to Aditya Keerthi from comment #2)
&gt; &gt; The &quot;Take Photo&quot; action is displayed whenever image types are accepted by
&gt; &gt; the file input, and is independent of the &quot;capture&quot; attribute. The spec
&gt; &gt; doesn&apos;t say that we should exclude such an option if &quot;capture&quot; is not
&gt; &gt; specified.
&gt; &gt; 
&gt; &gt; Can you elaborate on why you want to disable this action?
&gt; 
&gt; sir,
&gt; The file input is not of type picture, but &quot;Photo&quot; still shows up, then
&gt; Clicking &quot;take a photo&quot; on an html page will crash the app, even if the app
&gt; doesn&apos;t have permission to open the camera.
&gt; My project has webview in an APP, happens as described earlier.
&gt; 
&gt; So I think there has to be a feature to disable it off

Thanks for the explanation.

We currently show &quot;Photo&quot; options unless the input explicitly excludes images via the &quot;accept&quot; attribute. This means that a plain &lt;input type=file&gt; will always show the &quot;Take Photo&quot; item.

I think we should consider removing the menu item in WebKit if the app doesn&apos;t have the necessary permissions. Retitling the bug to reflect the issue more clearly. Please let me know if I have misinterpreted something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1846373</commentid>
    <comment_count>5</comment_count>
    <who name="alexhsu">weaksdfg</who>
    <bug_when>2022-02-26 22:47:18 -0800</bug_when>
    <thetext>(In reply to Aditya Keerthi from comment #4)
&gt; (In reply to alexhsu from comment #3)
&gt; &gt; (In reply to Aditya Keerthi from comment #2)
&gt; &gt; &gt; The &quot;Take Photo&quot; action is displayed whenever image types are accepted by
&gt; &gt; &gt; the file input, and is independent of the &quot;capture&quot; attribute. The spec
&gt; &gt; &gt; doesn&apos;t say that we should exclude such an option if &quot;capture&quot; is not
&gt; &gt; &gt; specified.
&gt; &gt; &gt; 
&gt; &gt; &gt; Can you elaborate on why you want to disable this action?
&gt; &gt; 
&gt; &gt; sir,
&gt; &gt; The file input is not of type picture, but &quot;Photo&quot; still shows up, then
&gt; &gt; Clicking &quot;take a photo&quot; on an html page will crash the app, even if the app
&gt; &gt; doesn&apos;t have permission to open the camera.
&gt; &gt; My project has webview in an APP, happens as described earlier.
&gt; &gt; 
&gt; &gt; So I think there has to be a feature to disable it off
&gt; 
&gt; Thanks for the explanation.
&gt; 
&gt; We currently show &quot;Photo&quot; options unless the input explicitly excludes
&gt; images via the &quot;accept&quot; attribute. This means that a plain &lt;input type=file&gt;
&gt; will always show the &quot;Take Photo&quot; item.
&gt; 
&gt; I think we should consider removing the menu item in WebKit if the app
&gt; doesn&apos;t have the necessary permissions. Retitling the bug to reflect the
&gt; issue more clearly. Please let me know if I have misinterpreted something.

yes, as you describe
Mainly want to be able to control this property
I would like to ask about the approximate date of this bug timeline?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>