Changeset 140109 in webkit


Ignore:
Timestamp:
Jan 18, 2013 1:29:25 AM (11 years ago)
Author:
vivek.vg@samsung.com
Message:

Web Inspector: Search shortcut clears the current search box contents
https://bugs.webkit.org/show_bug.cgi?id=107109

Reviewed by Pavel Feldman.

The search box contents should be changed only when the current focus element is
different than the _searchInputElement.

  • inspector/front-end/SearchController.js:

(WebInspector.SearchController.prototype.showSearchField):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140107 r140109  
     12013-01-18  Vivek Galatage  <vivek.vg@samsung.com>
     2
     3        Web Inspector: Search shortcut clears the current search box contents
     4        https://bugs.webkit.org/show_bug.cgi?id=107109
     5
     6        Reviewed by Pavel Feldman.
     7
     8        The search box contents should be changed only when the current focus element is
     9        different than the _searchInputElement.
     10
     11        * inspector/front-end/SearchController.js:
     12        (WebInspector.SearchController.prototype.showSearchField):
     13
    1142013-01-18  Eugene Klyuchnikov  <eustas@chromium.org>
    215
  • trunk/Source/WebCore/inspector/front-end/SearchController.js

    r140102 r140109  
    250250        this._updateReplaceVisibility();
    251251        this._updateFilterVisibility();
    252         var selection = window.getSelection();
    253         if (selection.rangeCount)
    254             this._searchInputElement.value = selection.toString().replace(/\r?\n.*/, "");
     252        if (WebInspector.currentFocusElement() !== this._searchInputElement) {
     253            var selection = window.getSelection();
     254            if (selection.rangeCount)
     255                this._searchInputElement.value = selection.toString().replace(/\r?\n.*/, "");
     256        }
    255257        this._performSearch(this._searchInputElement.value, true, false);
    256258        this._searchInputElement.focus();
Note: See TracChangeset for help on using the changeset viewer.