HomePhabricator

Auto-scroll text editor to changes
c2af27fef60dUnpublished

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

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

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, 12:07 PM
Parents
rESCC12bfb6c23648: Auto-fix whitespaces and indenting
Branches
Unknown
Tags
Unknown
References
refs/changes/26/333026/9
ChangeId
Ie4d2d932ea72a667c20873f02064839e0ca0e393