mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Fix scrollbar being cut off at end of gutter
Summary: The "mlb" on the left nav creates a phantom bottom margin which gives the content measurable height but not scrollable height. Replace it with "plb" (padding) instead. The 2px-spacer calculation was also not quite correct. Test Plan: - Viewed pages with navs; padding vs margin didn't seem to make any other differences. - Scrollbar now stops in the right place in Safari, Chrome, Firefox. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D12007
This commit is contained in:
parent
076cc6ed7e
commit
b8ed980d3d
3 changed files with 16 additions and 11 deletions
|
@ -207,7 +207,7 @@ return array(
|
|||
'rsrc/externals/javelin/lib/Resource.js' => '44959b73',
|
||||
'rsrc/externals/javelin/lib/Routable.js' => 'b3e7d692',
|
||||
'rsrc/externals/javelin/lib/Router.js' => '29274e2b',
|
||||
'rsrc/externals/javelin/lib/Scrollbar.js' => '5b2f5a08',
|
||||
'rsrc/externals/javelin/lib/Scrollbar.js' => '1ed54a27',
|
||||
'rsrc/externals/javelin/lib/URI.js' => '6eff08aa',
|
||||
'rsrc/externals/javelin/lib/Vector.js' => '2caa8fb8',
|
||||
'rsrc/externals/javelin/lib/WebSocket.js' => 'e292eaf4',
|
||||
|
@ -676,7 +676,7 @@ return array(
|
|||
'javelin-resource' => '44959b73',
|
||||
'javelin-routable' => 'b3e7d692',
|
||||
'javelin-router' => '29274e2b',
|
||||
'javelin-scrollbar' => '5b2f5a08',
|
||||
'javelin-scrollbar' => '1ed54a27',
|
||||
'javelin-stratcom' => '6c53634d',
|
||||
'javelin-tokenizer' => '7644823e',
|
||||
'javelin-typeahead' => '70baed2f',
|
||||
|
@ -942,6 +942,12 @@ return array(
|
|||
'javelin-dom',
|
||||
'javelin-reactor-dom',
|
||||
),
|
||||
'1ed54a27' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-vector',
|
||||
),
|
||||
'2035b9cb' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1175,12 +1181,6 @@ return array(
|
|||
'javelin-vector',
|
||||
'javelin-dom',
|
||||
),
|
||||
'5b2f5a08' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-vector',
|
||||
),
|
||||
'5bc2cb21' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
|
|
@ -318,7 +318,7 @@ final class AphrontSideNavFilterView extends AphrontView {
|
|||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-nav-content mlb',
|
||||
'class' => 'phabricator-nav-content plb',
|
||||
'id' => $content_id,
|
||||
),
|
||||
array(
|
||||
|
|
|
@ -320,10 +320,15 @@ JX.install('Scrollbar', {
|
|||
var spos = JX.Vector.getAggregateScrollForNode(this._viewport);
|
||||
var vdim = JX.Vector.getDim(this._viewport);
|
||||
|
||||
var ratio = vdim.y / cdim.y;
|
||||
var ratio = (vdim.y / cdim.y);
|
||||
|
||||
// We're scaling things down very slightly to leave a 2px margin at
|
||||
// either end of the scroll gutter, so the bar doesn't quite bump up
|
||||
// against the chrome.
|
||||
ratio = ratio * (vdim.y / (vdim.y + 4));
|
||||
|
||||
var offset = Math.round(ratio * spos.y) + 2;
|
||||
var size = Math.floor(ratio * (vdim.y - 2)) - 2;
|
||||
var size = Math.floor(ratio * vdim.y);
|
||||
|
||||
if (size < cdim.y) {
|
||||
this._handle.style.top = offset + 'px';
|
||||
|
|
Loading…
Reference in a new issue