Changeset 190285 in webkit


Ignore:
Timestamp:
Sep 28, 2015 2:44:26 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret
https://bugs.webkit.org/show_bug.cgi?id=149223

Patch by João Oliveira <hello@jxs.pt> on 2015-09-28
Reviewed by Timothy Hatcher.

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.

  • UserInterface/Views/SearchBar.js:

(WebInspector.SearchBar.prototype.focus):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r190246 r190285  
     12015-09-28  João Oliveira  <hello@jxs.pt>
     2
     3        Web Inspector: search shortcut in split console moves focus to search box, but doesn't show caret
     4        https://bugs.webkit.org/show_bug.cgi?id=149223
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        When pressing console find shortcut (CMD+F) SearchBar now checks if there's text on _searchInput
     9        if so text is selected, if the textbox is empty, textbox gains focus.
     10
     11        * UserInterface/Views/SearchBar.js:
     12        (WebInspector.SearchBar.prototype.focus):
     13
    1142015-09-25  Joseph Pecoraro  <pecoraro@apple.com>
    215
  • trunk/Source/WebInspectorUI/UserInterface/Views/SearchBar.js

    r189883 r190285  
    6262    focus()
    6363    {
    64         this._searchInput.focus();
    65         this._searchInput.select();
     64        // FIXME: Workaround for: <https://webkit.org/b/149504> Caret missing from <input> after clearing text and calling select()
     65        if (!this._searchInput.value.length)
     66            this._searchInput.focus();
     67        else
     68            this._searchInput.select();
    6669    }
    6770
Note: See TracChangeset for help on using the changeset viewer.