Title: [269074] trunk/Source/WebInspectorUI
- Revision
- 269074
- Author
- [email protected]
- Date
- 2020-10-27 14:48:35 -0700 (Tue, 27 Oct 2020)
Log Message
Web Inspector: Search: don't steal focus from the search field when shown
https://bugs.webkit.org/show_bug.cgi?id=218260
Reviewed by Brian Burg.
* UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype.focusSearchField):
(WI.SearchSidebarPanel.prototype.performSearch.createTreeElementForMatchObject):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (269073 => 269074)
--- trunk/Source/WebInspectorUI/ChangeLog 2020-10-27 21:46:21 UTC (rev 269073)
+++ trunk/Source/WebInspectorUI/ChangeLog 2020-10-27 21:48:35 UTC (rev 269074)
@@ -1,5 +1,16 @@
2020-10-27 Devin Rousso <[email protected]>
+ Web Inspector: Search: don't steal focus from the search field when shown
+ https://bugs.webkit.org/show_bug.cgi?id=218260
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Views/SearchSidebarPanel.js:
+ (WI.SearchSidebarPanel.prototype.focusSearchField):
+ (WI.SearchSidebarPanel.prototype.performSearch.createTreeElementForMatchObject):
+
+2020-10-27 Devin Rousso <[email protected]>
+
Web Inspector: REGRESSION(r266669): Uncaught Exception: TypeError: node.nodeType is not a function. (In 'node.nodeType()', 'node.nodeType' is undefined)
https://bugs.webkit.org/show_bug.cgi?id=218254
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js (269073 => 269074)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js 2020-10-27 21:46:21 UTC (rev 269073)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js 2020-10-27 21:48:35 UTC (rev 269074)
@@ -93,10 +93,10 @@
this._inputElement.select();
if (performSearch)
- this.performSearch(this._inputElement.value);
+ this.performSearch(this._inputElement.value, {omitFocus: true});
}
- performSearch(searchQuery)
+ performSearch(searchQuery, {omitFocus} = {})
{
this._inputElement.value = searchQuery;
this._searchQuerySetting.value = searchQuery;
@@ -141,7 +141,7 @@
createSearchingPlaceholder();
WI.whenTargetsAvailable().then(() => {
if (this._searchQuerySetting.value === searchQuery)
- this.performSearch(searchQuery);
+ this.performSearch(searchQuery, {omitFocus});
});
return;
}
@@ -176,8 +176,10 @@
parentTreeElement.appendChild(matchTreeElement);
- if (!this.contentTreeOutline.selectedTreeElement)
- matchTreeElement.revealAndSelect(false, true);
+ if (!this.contentTreeOutline.selectedTreeElement) {
+ const selectedByUser = true;
+ matchTreeElement.revealAndSelect(omitFocus ?? false, selectedByUser);
+ }
}
function forEachMatch(lineContent, callback)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes