Bug 245478

Summary: Web Inspector: Computed tab scrolls back to top when <style> is added to page
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: Web InspectorAssignee: Razvan Caliman <rcaliman>
Status: RESOLVED FIXED    
Severity: Normal CC: awm16899, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: Mac (Apple Silicon)   
OS: macOS 12   

Description Jeff Johnson 2022-09-21 07:21:29 PDT
Safari 16.0 (17614.1.25.9.10, 17614) on macOS 12.6 (21G115)

Steps to reproduce:
1) Open https://webkit.org in Safari
2) Inspect Element on any element in the page
3) Select the Computed tab
4) Scroll down the Computed tab
5) In the console, enter: document.head.appendChild(document.createElement("style"));

Expected results: The Computed scroll position is preserved

Actual results: The Computed tab is scrolled back to the top

This behavior makes it extremely difficult to inspect some web sites. I see this behavior on https://www.cnn.com for example, where the Computed tab is constantly constantly scrolling back to the top, so I can't even see what the values are of properties scrolled down.
Comment 1 Radar WebKit Bug Importer 2022-09-28 07:22:19 PDT
<rdar://problem/100507752>
Comment 2 Razvan Caliman 2022-09-28 13:29:21 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4802
Comment 3 EWS 2022-09-29 09:52:45 PDT
Committed 255001@main (94fb9bb96d6a): <https://commits.webkit.org/255001@main>

Reviewed commits have been landed. Closing PR #4802 and removing active labels.