Bug 275606

Summary: Web Inspector: Preserve log loses message after window.open and navigation
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: CLOSED INVALID    
Severity: Normal CC: inspector-bugzilla-changes
Priority: P2    
Version: Safari 17   
Hardware: Mac (Apple Silicon)   
OS: All   
Attachments:
Description Flags
Sample HTML demonstrating the bug none

Description Jeff Johnson 2024-06-18 06:54:46 PDT
Created attachment 471698 [details]
Sample HTML demonstrating the bug

Safari 17.5 and Safari Technology Preview 196 on macOS Sonoma 14.5. (I haven't tested on any other configurations.)

Steps to reproduce:
1. Open the attached sample HTML in Safari
2. Open the web inspector to the Console tab
3. Enable Preserve Log
4. Click the window.open() button
5. Wait 5 seconds until the new tab navigates to https://webkit.org/
6. Select the new tab
7. Open the web inspector to the Console tab

Expected results: Log message "Hello world!"

Actual results: No log message

However, you can see the log message if you skip step 5 and quickly do steps 6 and 7 before the timeout.