<?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>132974</bug_id>
          
          <creation_ts>2014-05-15 16:12:55 -0700</creation_ts>
          <short_desc>[iOS] www.wikipedia.org is loading much slower due to FormClient::willBeginInputSession</short_desc>
          <delta_ts>2015-03-16 17:23:35 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to>mitz</assigned_to>
          <cc>enrica</cc>
    
    <cc>jberkman</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1009651</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2014-05-15 16:12:55 -0700</bug_when>
    <thetext>&lt;rdar://problem/16844952&gt;

The Wikipedia homepage contains an auto-focusing input element. When the element is focused, we tell the form bundle client that we’re starting a form input session, even though we don’t need to, because non-user-initiated focusing doesn’t start an input session on the UI process side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1009657</commentid>
    <comment_count>1</comment_count>
      <attachid>231541</attachid>
    <who name="">mitz</who>
    <bug_when>2014-05-15 16:25:42 -0700</bug_when>
    <thetext>Created attachment 231541
Only call the FromClient function if the UI process will start an input session</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1009660</commentid>
    <comment_count>2</comment_count>
      <attachid>231541</attachid>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2014-05-15 16:44:32 -0700</bug_when>
    <thetext>Comment on attachment 231541
Only call the FromClient function if the UI process will start an input session

Looks good to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1009661</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2014-05-15 16:47:07 -0700</bug_when>
    <thetext>Fixed in &lt;http://trac.webkti.org/r168916&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1077655</commentid>
    <comment_count>4</comment_count>
    <who name="jacob berkman">jberkman</who>
    <bug_when>2015-03-16 17:14:40 -0700</bug_when>
    <thetext>It looks like this prevents any scripts from being able to show the keyboard.

Our app embeds an html page, and has an interface similar to Keynote, in that tapping on an element presents a wireframe, and double-tapping begins editing. We handle the double-tap gesture my making a call to -[WKWebView evaluateJavaScript:completionHandler:], which ends up calling element.focus() on the appropriate node.

I suspect that setting m_userIsInteracting = true in WebPage::runJavaScriptInMainFrame() would work around this in some cases, but I&apos;m guessing that wouldn&apos;t work if we ended up calling .focus() in a timeout handler.

Are there any other mechanisms that could be done to allow element focusing from JS? Maybe require interaction only while the page is loading or something? We&apos;ve been looking forward to moving to WKWebView since last June but this behaviour has prevented us from making the switch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1077657</commentid>
    <comment_count>5</comment_count>
    <who name="">mitz</who>
    <bug_when>2015-03-16 17:18:02 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; It looks like this prevents any scripts from being able to show the keyboard.
&gt; 
&gt; Our app embeds an html page, and has an interface similar to Keynote, in
&gt; that tapping on an element presents a wireframe, and double-tapping begins
&gt; editing. We handle the double-tap gesture my making a call to -[WKWebView
&gt; evaluateJavaScript:completionHandler:], which ends up calling
&gt; element.focus() on the appropriate node.
&gt; 
&gt; I suspect that setting m_userIsInteracting = true in
&gt; WebPage::runJavaScriptInMainFrame() would work around this in some cases,
&gt; but I&apos;m guessing that wouldn&apos;t work if we ended up calling .focus() in a
&gt; timeout handler.
&gt; 
&gt; Are there any other mechanisms that could be done to allow element focusing
&gt; from JS? Maybe require interaction only while the page is loading or
&gt; something? We&apos;ve been looking forward to moving to WKWebView since last June
&gt; but this behaviour has prevented us from making the switch.

Commenting on this resolved bug is not a good way to raise issues with the current behavior. If there are such issues, please report a new bug. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1077661</commentid>
    <comment_count>6</comment_count>
    <who name="jacob berkman">jberkman</who>
    <bug_when>2015-03-16 17:23:35 -0700</bug_when>
    <thetext>n/p, filed bug 142757. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>231541</attachid>
            <date>2014-05-15 16:25:42 -0700</date>
            <delta_ts>2014-05-15 16:44:32 -0700</delta_ts>
            <desc>Only call the FromClient function if the UI process will start an input session</desc>
            <filename>bug-132974-20140515162518.patch</filename>
            <type>text/plain</type>
            <size>2300</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDE2ODkxNCkKKysrIFNvdXJjZS9XZWJLaXQyL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDE0LTA1LTE1ICBEYW4gQmVy
bnN0ZWluICA8bWl0ekBhcHBsZS5jb20+CisKKyAgICAgICAgW2lPU10gd3d3Lndpa2lwZWRpYS5v
cmcgaXMgbG9hZGluZyBtdWNoIHNsb3dlciBkdWUgdG8gRm9ybUNsaW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IHRoZSBXZWIgUG9y
Y2Vzcywgd2Ugc2hvdWxkIHJlZmluZSB0aGUgY29uZGl0aW9uLgorICAgICAgICBpZiAobV91c2Vy
SXNJbnRlcmFjdGluZykKKyAgICAgICAgICAgIG1fZm9ybUNsaWVudC0+d2lsbEJlZ2luSW5wdXRT
ZXNzaW9uKHRoaXMsIHRvRWxlbWVudChub2RlKSwgV2ViRnJhbWU6OmZyb21Db3JlRnJhbWUoKm5v
ZGUtPmRvY3VtZW50KCkuZnJhbWUoKSksIHVzZXJEYXRhKTsKKwogICAgICAgICBzZW5kKE1lc3Nh
Z2VzOjpXZWJQYWdlUHJveHk6OlN0YXJ0QXNzaXN0aW5nTm9kZShpbmZvcm1hdGlvbiwgbV91c2Vy
SXNJbnRlcmFjdGluZywgSW5qZWN0ZWRCdW5kbGVVc2VyTWVzc2FnZUVuY29kZXIodXNlckRhdGEu
Z2V0KCkpKSk7CiAgICAgfQogfQo=
</data>
<flag name="review"
          id="255990"
          type_id="1"
          status="+"
          setter="enrica"
    />
          </attachment>
      

    </bug>

</bugzilla>