Document is scrolled to the top when entering text in the editor

RESOLVED FIXED in 0.8.1

Status

Skywriter
Editor
--
major
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Leonid Khachaturov, Assigned: Julian Viereck)

Tracking

unspecified
0.8.1

Details

Attachments

(2 attachments)

1.03 KB, patch
Details | Diff | Splinter Review
1010 bytes, application/octet-stream
Details
(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7
Build Identifier: 0.7.3

When a page with Bespin Embedded has been scrolled from the top (left as well, presumably), focusing the editor or entering text resets the page scroll to (0,0). This bug makes Bespin unusable on long pages where the editor is not located at the very top of the page. This is a regression from 0.6.3

Reproducible: Always

Steps to Reproduce:
1. Open the bundled example from samples/sample.html
2. Make the window small enough to make the vertical scrollbar appear
3. Scroll the page and focus the editor (or type a character if the editor is already in focus)
Actual Results:  
Page scroll is reset

Expected Results:  
Page scroll should've stayed intact
(Assignee)

Updated

8 years ago
Assignee: nobody → jviereck
(Assignee)

Comment 1

8 years ago
I tried to reproduce this with the current code (changeset fc5b81598a80) and it seemed to be fixed.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Comment 2

8 years ago
Moving to 0.8
Target Milestone: --- → 0.8
(Assignee)

Updated

8 years ago
Duplicate of this bug: 562834
satyr on IRC says this is still an issue with elem.bespin.editor.focus = true.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---

Comment 5

8 years ago
Created attachment 452863 [details] [diff] [review]
patch

test case: http://gist.github.com/384566

Looks like the hidden textarea need to be horizontally "in window."
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
(Sorry for the bugspam. I was trying to get the REOPENED status, but that's apparently unavailable.)

Comment 7

8 years ago
Created attachment 453015 [details]
patch take 2

Comment 8

8 years ago
(In reply to comment #7)
This should sync the textarea position with editor, keeping scrolling behavior as natural as possible.
Not sure with what browser/version pair the focus ring appears pwalton mentioned. (Looks fine on Fx3.6/Safari5)

Comment 9

8 years ago
Bumping the milestone so that we'll look at this for 0.8.1
Target Milestone: 0.8 → 0.8.1
(Assignee)

Comment 10

8 years ago
I pushed satyr's patch in changeset 4ba8c29c82fe and a small addition in e5c9fc8d521a.

Thanks again satyr!
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.