Bug 253485 - BBEdit Preview sometimes loses scroll position when editing
Summary: BBEdit Preview sometimes loses scroll position when editing
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: WebKit Nightly Build
Hardware: Mac (Intel) macOS 11
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-06 22:25 PST by Paul
Modified: 2023-04-29 15:34 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 Paul 2023-03-06 22:25:11 PST
In BBEdit 14.6.4, I'm editing a 5,400+ lines local HTML file and using the Preview to... preview... the changes. 
I'm halfway down the page and I add a "<br>" to a line and press Return. 
The Preview page refreshes and scrolls to the top, losing my place. 

BBEdit support wrote:
> For reference, BBEdit does already request that the web view retain its scrolled position (which is why this sometimes does succeed),
 but in cases where it does not, I regret there's nothing further to be done.
Comment 1 Radar WebKit Bug Importer 2023-03-13 23:26:16 PDT
<rdar://problem/106684554>
Comment 2 Simon Fraser (smfr) 2023-04-23 10:34:57 PDT
I tried editing a long scrolling HTML file with the BBEdit Preview visible, and it retained the scroll position when adding <br>s.

Does this depend on the document being previewed? Does it always happen?

What OS version are you testing on?
Comment 3 Paul 2023-04-23 19:09:33 PDT
(In reply to Simon Fraser (smfr) from comment #2)
> I tried editing a long scrolling HTML file with the BBEdit Preview visible,
> and it retained the scroll position when adding <br>s.
> 
> Does this depend on the document being previewed? Does it always happen?
> 
> What OS version are you testing on?

Ah... I found a(n extreme) case. 

1. Open a long HTML doc and its Preview
2. Scroll halfway down in both windows
3. Enter a <br> in the code
--> the Preview remains scrolled
4. Scroll to near the bottom of the code and enter a <br> twice and then delete them
--> Preview jumps to the top
Comment 4 Paul 2023-04-29 15:34:36 PDT
Mac OS 11.7
BBEdit 14.6.5