Bug 259843

Summary: Web Inspector: No search results
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: Web InspectorAssignee: Frances Cornwall <frances_c>
Status: RESOLVED FIXED    
Severity: Blocker CC: frances_c, inspector-bugzilla-changes, pc2, rcaliman, w0nka, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   
Attachments:
Description Flags
Screenshot of Safari Technology Preview
none
Screenshot of Safari none

Description Jeff Johnson 2023-08-04 15:59:49 PDT
Created attachment 467199 [details]
Screenshot of Safari Technology Preview

Safari Technology Preview 175 (Safari 17.0, WebKit 18617.1.1.2) on macOS (22G74)

Steps to reproduce:
1) Open https://webkit.org
2) Open web inspector
3) Select Sources tab
4) Select global.js in the sidebar
5) Search for "document" in the global.js file

Expected Results: 5 matches

Actual Results: No matches

This bug does not occur in Safari 16.6 (18615.3.12.11.2)
Comment 1 Jeff Johnson 2023-08-04 16:00:13 PDT
Created attachment 467200 [details]
Screenshot of Safari
Comment 2 Jeff Johnson 2023-08-04 17:32:40 PDT
On further investigation, there are no search results anywhere in the web inspector.
Comment 3 Frances Cornwall 2023-08-07 20:41:01 PDT
I tested in STP 175 and Minibrowser. I found that search did not fire when entering text. If you press the done button, and then open up the search panel again, the results will populate correctly. If you attempt to do a further search, you will have to repeat the steps as mentioned before.

Currently investigating a fix for this bug.
Comment 4 Frances Cornwall 2023-08-08 08:20:15 PDT
In FindBanner.js the _inputFieldSearch(event) is not being triggered. (I can see that there is an event listener in the constructor.)

this._inputField.addEventListener("search", this._inputFieldSearch.bind(this), false);

If I add a call to that function (this._inputFieldSearch(event)) in _inputFieldKeyUp(event) the search starts working when typing. 

I am not confident this is the correct solution though.


Frances@MacBook-Air WebKit % git diff
diff --git a/Source/WebInspectorUI/UserInterface/Views/FindBanner.js b/Source/WebInspectorUI/UserInterface/Views/FindBanner.js
index debbf8e67296..df9c4cea0b8f 100644
--- a/Source/WebInspectorUI/UserInterface/Views/FindBanner.js
+++ b/Source/WebInspectorUI/UserInterface/Views/FindBanner.js
@@ -241,6 +241,8 @@ WI.FindBanner = class FindBanner extends WI.NavigationItem
             this._searchBackwards = false;
         else if (event.keyIdentifier === "Enter")
             this._searchKeyPressed = false;
+
+        this._inputFieldSearch(event)
     }
 
     _inputFieldSearch(event)
Comment 5 Frances Cornwall 2023-08-08 18:58:28 PDT
Pull request: https://github.com/WebKit/WebKit/pull/16507
Comment 6 EWS 2023-08-10 14:31:06 PDT
Committed 266783@main (6d291b6825cc): <https://commits.webkit.org/266783@main>

Reviewed commits have been landed. Closing PR #16507 and removing active labels.
Comment 7 Radar WebKit Bug Importer 2023-08-10 14:32:16 PDT
<rdar://problem/113714342>
Comment 8 Alexey Proskuryakov 2023-08-24 09:22:26 PDT
*** Bug 260545 has been marked as a duplicate of this bug. ***