<?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>190776</bug_id>
          
          <creation_ts>2018-10-20 14:17:03 -0700</creation_ts>
          <short_desc>[iOS][WK1] Spelling correction dots do not show unless you focus editable content and then defocus it</short_desc>
          <delta_ts>2018-10-20 14:22:39 -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>WebKit Misc.</component>
          <version>WebKit Local Build</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 12</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=188762</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, PlatformOnly</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Bates">dbates</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1471118</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-10-20 14:17:03 -0700</bug_when>
    <thetext>Consider a page with the following markup

[[
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width&quot;&gt;
&lt;style&gt;
    p {
        border: 1px solid black;
        height: 300px;
        width: 200px;
    }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p id=&quot;test&quot; contenteditable=&quot;true&quot;&gt;&lt;/p&gt;
&lt;script&gt;
    let test = document.getElementById(&quot;test&quot;);
    test.focus();
    document.execCommand(&quot;InsertText&quot;, false, &quot;the the mispelled&quot;);
    document.execCommand(&quot;InsertText&quot;, false, &quot; &quot;); // Trigger spelling and grammar checking
&lt;/script&gt;
&lt;button&gt;Spell check&lt;/button&gt;
&lt;/body&gt;
&lt;/html&gt;
]]

If you focus the editable field we do not show spelling correction dots. If you type more misspelled words we also do not show spelling correction dots. (Notice that tapping &quot;mispelled&quot; turns it red and shows a callout with suggested replacements. (*)) If you click Done to dismiss the keyboard we do not show spelling correction dots. We only start showing spelling correction dots if you focus the editable field then click &quot;Spell check&quot;.

This bug was mentioned in &lt;https://stackoverflow.com/questions/46347640/how-to-make-the-spellcheck-work-on-uiwebview&gt;, &lt;https://stackoverflow.com/questions/49274812/spellcheck-is-not-working-in-uiwebview-ios&gt;, and &lt;https://stackoverflow.com/questions/7927605/how-to-activate-spellchecking-for-a-contenteditable-div-in-a-uiwebview&gt;.

(*) Raised in &lt;https://stackoverflow.com/questions/25440134/spellcheck-for-input-in-uiwebview-is-stopped-working&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471119</commentid>
    <comment_count>1</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2018-10-20 14:20:44 -0700</bug_when>
    <thetext>Unlike on Mac, we disable continuous spelling checking on iOS in a newly instantiated WebView at &lt;https://github.com/WebKit/webkit/blob/222dd8822aaf985a0a3314297905cb8781605192/Source/WebKitLegacy/mac/WebView/WebView.mm#L5512&gt;. We then use some-kind of heuristic to decide when to trigger spell checking.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1471120</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-10-20 14:22:39 -0700</bug_when>
    <thetext>&lt;rdar://problem/45433889&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>