HomePhabricator

Auto-scroll text editor to changes

Authored by WMDE-Fisch on Jan 19 2017, 5:40 PM.

Description

Auto-scroll text editor to changes

When loading the editor for the first time a base
scroll offset is calculated for each change div
element and saved within the diff element.

These offset values are refreshed when the window
resizes and therefore the offset changes.

To calculate that offset a hidden editor is build
that is layouted like the actual textarea but can
provide marked up text.

When loading the conflict page for the first time,
the editor scrolls to the first edit conflict.

When clicking on a foreign/own change the scroll-
offset is used to scroll the editor to the corresponding
position.

Bug: T144608
Change-Id: Ie4d2d932ea72a667c20873f02064839e0ca0e393

Details

Committed
WMDE-FischJan 27 2017, 3:24 PM
Parents
rESCC5c8e02e9e70b: Auto-fix whitespaces and indenting
Branches
Unknown
Tags
Unknown
References
refs/changes/26/333026/10
ChangeId
Ie4d2d932ea72a667c20873f02064839e0ca0e393