[Webkit-unassigned] [Bug 149223] Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 23 09:56:31 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=149223

--- Comment #6 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 261819
  --> https://bugs.webkit.org/attachment.cgi?id=261819
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=261819&action=review

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

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

Nit: End in a period.

> Source/WebInspectorUI/ChangeLog:150
> -        is selected and not updating focused element. 
> +        is selected and not updating focused element.

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

> Source/WebInspectorUI/UserInterface/Views/SearchBar.js:64
> +        if (this._searchInput.value.length == 0)

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

> Source/WebInspectorUI/UserInterface/Views/SearchBar.js:67
> +            this._searchInput.focus();
> +        else
> +            this._searchInput.select();

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: <https://webkit.org/b/149504> Caret missing from <input> after clearing text and calling select()

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150923/f32c83e9/attachment-0001.html>


More information about the webkit-unassigned mailing list