mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-25 06:50:55 +01:00
Revert "Autoscroll sidebar"
This reverts commit 3df0cfa641
.
See D3473 for discussion. This causes some issues with scrolling on Mountain Lion.
This commit is contained in:
parent
e0e97b08b8
commit
2b25bfe65d
1 changed files with 4 additions and 16 deletions
|
@ -28,11 +28,8 @@ JX.behavior('phabricator-active-nav', function(config) {
|
||||||
link,
|
link,
|
||||||
'phabricator-active-nav-focus',
|
'phabricator-active-nav-focus',
|
||||||
selected);
|
selected);
|
||||||
if (selected && link.scrollIntoView) {
|
|
||||||
link.scrollIntoView(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,24 +72,15 @@ JX.behavior('phabricator-active-nav', function(config) {
|
||||||
|
|
||||||
// If we get above the first marker, select it.
|
// If we get above the first marker, select it.
|
||||||
selectnav(active && JX.Stratcom.getData(active).anchor);
|
selectnav(active && JX.Stratcom.getData(active).anchor);
|
||||||
};
|
}
|
||||||
|
|
||||||
var pending = null;
|
var pending = null;
|
||||||
var onviewportchange = function(e) {
|
var onviewportchange = function(e) {
|
||||||
pending && clearTimeout(pending);
|
pending && clearTimeout(pending);
|
||||||
pending = setTimeout(updateposition, 100);
|
pending = setTimeout(updateposition, 100);
|
||||||
};
|
}
|
||||||
|
|
||||||
var onscroll = function(e) {
|
JX.Stratcom.listen('scroll', null, onviewportchange);
|
||||||
if (e.getNode('tag:body')) {
|
|
||||||
// If we are inside <body> then it means we just scrolled some <textarea>
|
|
||||||
// or <div style="overflow: scroll;">. We are interested only in window.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
onviewportchange(e);
|
|
||||||
};
|
|
||||||
|
|
||||||
JX.Stratcom.listen('scroll', null, onscroll);
|
|
||||||
JX.Stratcom.listen('resize', null, onviewportchange);
|
JX.Stratcom.listen('resize', null, onviewportchange);
|
||||||
JX.Stratcom.listen('hashchange', null, onviewportchange);
|
JX.Stratcom.listen('hashchange', null, onviewportchange);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue