1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-29 16:08:22 +01:00

Fix scrolling behavior in Diffusion

Summary: Fixes T7084. This doesn't use the same anchor logic as other applications.

Test Plan: `$245` lines now jump to line 245 on page load.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T7084

Differential Revision: https://secure.phabricator.com/D11563
This commit is contained in:
epriestley 2015-01-29 10:20:35 -08:00
parent ed5d65fb5b
commit 7ed4bb4f17
2 changed files with 14 additions and 13 deletions

View file

@ -7,7 +7,7 @@
*/
return array(
'names' => array(
'core.pkg.css' => '024a3170',
'core.pkg.css' => '8815f87d',
'core.pkg.js' => '65e04767',
'darkconsole.pkg.js' => '8ab24e01',
'differential.pkg.css' => '8af45893',
@ -151,7 +151,7 @@ return array(
'rsrc/css/sprite-gradient.css' => '4bdb98a7',
'rsrc/css/sprite-login.css' => 'a355d921',
'rsrc/css/sprite-main-header.css' => '92720ee2',
'rsrc/css/sprite-menu.css' => '5033f9a1',
'rsrc/css/sprite-menu.css' => '9457345d',
'rsrc/css/sprite-projects.css' => 'b0d9e24f',
'rsrc/css/sprite-tokens.css' => '1706b943',
'rsrc/externals/font/fontawesome/fontawesome-webfont.eot' => '5fb6fb0e',
@ -322,8 +322,8 @@ return array(
'rsrc/image/sprite-login-X2.png' => '5ae6de3a',
'rsrc/image/sprite-login.png' => '07f2c67c',
'rsrc/image/sprite-main-header.png' => '83521873',
'rsrc/image/sprite-menu-X2.png' => '670cb5d7',
'rsrc/image/sprite-menu.png' => '8c056996',
'rsrc/image/sprite-menu-X2.png' => 'acea7012',
'rsrc/image/sprite-menu.png' => '24e76f8a',
'rsrc/image/sprite-projects-X2.png' => '8c91c839',
'rsrc/image/sprite-projects.png' => 'ef9dc9b5',
'rsrc/image/sprite-tokens-X2.png' => 'b4776580',
@ -371,7 +371,7 @@ return array(
'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'd835b03a',
'rsrc/js/application/diffusion/behavior-commit-branches.js' => 'bdaf4d04',
'rsrc/js/application/diffusion/behavior-commit-graph.js' => 'f7f1289f',
'rsrc/js/application/diffusion/behavior-jump-to.js' => '965cab65',
'rsrc/js/application/diffusion/behavior-jump-to.js' => '73d09eef',
'rsrc/js/application/diffusion/behavior-load-blame.js' => '42126667',
'rsrc/js/application/diffusion/behavior-locate-file.js' => '6d3e1947',
'rsrc/js/application/diffusion/behavior-pull-lastmodified.js' => '2b228192',
@ -574,7 +574,7 @@ return array(
'javelin-behavior-differential-user-select' => 'a8d8459d',
'javelin-behavior-diffusion-commit-branches' => 'bdaf4d04',
'javelin-behavior-diffusion-commit-graph' => 'f7f1289f',
'javelin-behavior-diffusion-jump-to' => '965cab65',
'javelin-behavior-diffusion-jump-to' => '73d09eef',
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
'javelin-behavior-doorkeeper-tag' => 'e5822781',
@ -816,7 +816,7 @@ return array(
'sprite-gradient-css' => '4bdb98a7',
'sprite-login-css' => 'a355d921',
'sprite-main-header-css' => '92720ee2',
'sprite-menu-css' => '5033f9a1',
'sprite-menu-css' => '9457345d',
'sprite-projects-css' => 'b0d9e24f',
'sprite-tokens-css' => '1706b943',
'syntax-highlighting-css' => '56c1ba38',
@ -1344,6 +1344,11 @@ return array(
'javelin-behavior',
'javelin-dom',
),
'73d09eef' => array(
'javelin-behavior',
'javelin-vector',
'javelin-dom',
),
'7644823e' => array(
'javelin-dom',
'javelin-util',
@ -1543,11 +1548,6 @@ return array(
'javelin-util',
'javelin-stratcom',
),
'965cab65' => array(
'javelin-behavior',
'javelin-vector',
'javelin-dom',
),
'988040b4' => array(
'javelin-install',
'javelin-dom',

View file

@ -8,7 +8,8 @@
JX.behavior('diffusion-jump-to', function(config) {
setTimeout(function() {
JX.DOM.scrollTo(0, JX.$V(JX.$(config.target)).y - 100);
var pos = JX.Vector.getPosWithScroll(JX.$(config.target));
JX.DOM.scrollToPosition(0, pos.y - 100);
}, 0);
});