Bug 259843 - Web Inspector: No search results
Summary: Web Inspector: No search results
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari Technology Preview
Hardware: Mac (Apple Silicon) macOS 13
: P1 Blocker
Assignee: Frances Cornwall
URL:
Keywords: InRadar
: 260545 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-08-04 15:59 PDT by Jeff Johnson
Modified: 2023-09-05 20:00 PDT (History)
6 users (show)

See Also:


Attachments
Screenshot of Safari Technology Preview (1.61 MB, image/png)
2023-08-04 15:59 PDT, Jeff Johnson
no flags Details
Screenshot of Safari (1.62 MB, image/png)
2023-08-04 16:00 PDT, Jeff Johnson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***