Bug 251622 - Searching for a regular expression that matches the empty string in the web inspector causes it to hang irrecoverably
Summary: Searching for a regular expression that matches the empty string in the web i...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari Technology Preview
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-02 11:21 PST by Jed Fox
Modified: 2023-02-22 08:10 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jed Fox 2023-02-02 11:21:50 PST
To reproduce:

1. Open any page (including about:blank)
2. Open the global search panel and enable searching by regular expressions. (I think this is what I did, I’m now unable to verify)
3. Search for `'isapprox' ||` (without the backticks)
4. hit return to start the search

Expected behavior: no results, or a warning that the regex matches the empty string
Actual behavior: web inspector hangs. There is no way to edit the search text since reopening the search tab causes the search to be conducted again. Also, I cannot find a way to put some text into the search field remotely (such as from a context menu somewhere)

[If you know where the setting that persists the search string is stored, please tell me so that I can get back the use of my search feature!]

macOS 13.2 (22D49)
STP Release 162 (Safari 16.4, WebKit 18615.1.18.2)
Comment 1 Radar WebKit Bug Importer 2023-02-09 11:22:19 PST
<rdar://problem/105231661>
Comment 2 Jed Fox 2023-02-22 08:10:15 PST
Finally remembered the workaround for this issue: go to the Settings tab and then choose General if it isn’t open already. Enable “⇧⌘F from selection” if it isn’t already checked. Then select some harmless text (like a variable name) in the Source tab and hit ⇧⌘F. You may need to close and reopen the Web Inspector after doing this to get back to a working state.