Web Inspector: Initial search is sometimes performed twice, produces duplicate results
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 22:45:08 +0000 (22:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 22:45:08 +0000 (22:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174047

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-06-30
Reviewed by Devin Rousso.

* UserInterface/Views/SearchTabContentView.js:
(WebInspector.SearchTabContentView.prototype.performSearch):
The initial layout of the tab content view was setting state to force a search
which may happen after a delay, however the global search field was causing
its own search to happen. We can clear the flag when a search is being performed
to prevent duplicating the search.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219021 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js

index cc4f623..1a7dcb6 100644 (file)
@@ -1,3 +1,17 @@
+2017-06-30  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Initial search is sometimes performed twice, produces duplicate results
+        https://bugs.webkit.org/show_bug.cgi?id=174047
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/SearchTabContentView.js:
+        (WebInspector.SearchTabContentView.prototype.performSearch):
+        The initial layout of the tab content view was setting state to force a search
+        which may happen after a delay, however the global search field was causing
+        its own search to happen. We can clear the flag when a search is being performed
+        to prevent duplicating the search.
+
 2017-06-30  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Add small delay before showing the progress spinner when loading resources
index cd7d6d4..3e99cf6 100644 (file)
@@ -86,6 +86,8 @@ WebInspector.SearchTabContentView = class SearchTabContentView extends WebInspec
     performSearch(searchQuery)
     {
         this.navigationSidebarPanel.performSearch(searchQuery);
+
+        this._forcePerformSearch = false;
     }
 
     handleCopyEvent(event)