Bug 245478 - Web Inspector: Computed tab scrolls back to top when <style> is added to page
Summary: Web Inspector: Computed tab scrolls back to top when <style> is added to page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Razvan Caliman
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-09-21 07:21 PDT by Jeff Johnson
Modified: 2022-11-02 09:56 PDT (History)
3 users (show)

See Also:


Attachments

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