mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-08 22:01:03 +01:00
ea67a8ab8e
Summary: Fixes T7033. When we've reframed the main page content we need to scroll relative to the containing frame, not relative to the window. Test Plan: In Safari, Chrome and Firefox, used j/k/J/K keys to navigate diff content. Tried some other scroll-based beahviors, like jump-to-anchors. (It looks like the highlighting reticle got slightly derped a while ago, but it's still functional, so I didn't mess with it.) Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T7033 Differential Revision: https://secure.phabricator.com/D11490
14 lines
293 B
JavaScript
14 lines
293 B
JavaScript
/**
|
|
* @provides javelin-behavior-diffusion-jump-to
|
|
* @requires javelin-behavior
|
|
* javelin-vector
|
|
* javelin-dom
|
|
*/
|
|
|
|
JX.behavior('diffusion-jump-to', function(config) {
|
|
|
|
setTimeout(function() {
|
|
JX.DOM.scrollTo(0, JX.$V(JX.$(config.target)).y - 100);
|
|
}, 0);
|
|
|
|
});
|