1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00
phorge-phorge/webroot/rsrc/js/application/diff
epriestley d161a07781 Improve Differential behavior when scrolling with anchors
Summary:
Fixes T12779. Currently, we scroll down if the midline of the changeset is above the midline of the viewport.

This rule can cause us to scroll improperly when loading changesets //after// jumping to their anchors, since the changeset we want to look at will likely have a midpoint above the document midline. That is, we follow an anchor to `X.c`, then it loads, then we scroll past it.

Instead, scroll only if the changeset is (almost) entirely above the viewport.

Test Plan:
Followed an anchor to `PHUIFeedStoryExample`:

{F4984154}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12779

Differential Revision: https://secure.phabricator.com/D18052
2017-05-30 17:56:03 -07:00
..
behavior-preview-link.js Make "View" links on Differential inline comment previews work again 2017-01-02 13:24:02 -08:00
DiffChangeset.js Improve Differential behavior when scrolling with anchors 2017-05-30 17:56:03 -07:00
DiffChangesetList.js Show the curent selected inline in the objective list 2017-05-20 08:01:21 -07:00
DiffInline.js Show the curent selected inline in the objective list 2017-05-20 08:01:21 -07:00
ScrollObjective.js Show "reply" inlines as replies in the objective list 2017-05-20 08:00:50 -07:00
ScrollObjectiveList.js Show "reply" inlines as replies in the objective list 2017-05-20 08:00:50 -07:00