<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret"
   href="https://bugs.webkit.org/show_bug.cgi?id=149223#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret"
   href="https://bugs.webkit.org/show_bug.cgi?id=149223">bug 149223</a>
              from <span class="vcard"><a class="email" href="mailto:joepeck&#64;webkit.org" title="Joseph Pecoraro &lt;joepeck&#64;webkit.org&gt;"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=261819&amp;action=diff" name="attach_261819" title="patch">attachment 261819</a> <a href="attachment.cgi?id=261819&amp;action=edit" title="patch">[details]</a></span>
patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=261819&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=261819&amp;action=review</a>

r- just to see a new version of the patch.

<span class="quote">&gt; Source/WebInspectorUI/ChangeLog:9
&gt; +        When pressing console find shortcut (CMD+F) SearchBar now checks if there's text on _searchInput
&gt; +        if so text is selected, if the textbox is empty, textbox gains focus</span >

Nit: End in a period.

<span class="quote">&gt; Source/WebInspectorUI/ChangeLog:150
&gt; -        is selected and not updating focused element. 
&gt; +        is selected and not updating focused element.</span >

You should drop all the whitespace changes below your additions at the top.

<span class="quote">&gt; Source/WebInspectorUI/UserInterface/Views/SearchBar.js:64
&gt; +        if (this._searchInput.value.length == 0)</span >

Style: We use `===` where possible, but in the case of 0 we would just use `!`. E.g. &quot;if (!this._searchInput.value.length)&quot;

<span class="quote">&gt; Source/WebInspectorUI/UserInterface/Views/SearchBar.js:67
&gt; +            this._searchInput.focus();
&gt; +        else
&gt; +            this._searchInput.select();</span >

So it turns out that this is an engine bug. Calling select in this case should show the caret and isn't.

I'd prefer if there was a comment here that we are working around a WebKit bug. I filed one, so you can add:

    // FIXME: Workaround for: &lt;<a href="https://webkit.org/b/149504">https://webkit.org/b/149504</a>&gt; Caret missing from &lt;input&gt; after clearing text and calling select()</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>