Commit 3e4f0436 authored by vivek.vg@samsung.com's avatar vivek.vg@samsung.com

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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d314b17e
2013-01-18 Vivek Galatage <vivek.vg@samsung.com>
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):
2013-01-18 Eugene Klyuchnikov <eustas@chromium.org>
Web Inspector: [Network] Fix JSDocs and deduplicate code.
......@@ -249,9 +249,11 @@ WebInspector.SearchController.prototype = {
WebInspector.inspectorView.setFooterElement(this._element);
this._updateReplaceVisibility();
this._updateFilterVisibility();
var selection = window.getSelection();
if (selection.rangeCount)
this._searchInputElement.value = selection.toString().replace(/\r?\n.*/, "");
if (WebInspector.currentFocusElement() !== this._searchInputElement) {
var selection = window.getSelection();
if (selection.rangeCount)
this._searchInputElement.value = selection.toString().replace(/\r?\n.*/, "");
}
this._performSearch(this._searchInputElement.value, true, false);
this._searchInputElement.focus();
this._searchInputElement.select();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment