Page MenuHomePhabricator

D11560.diff
No OneTemporary

D11560.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -199,7 +199,7 @@
'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' => 'ef2ec0c6',
+ 'rsrc/externals/javelin/lib/Scrollbar.js' => '5b2f5a08',
'rsrc/externals/javelin/lib/URI.js' => '6eff08aa',
'rsrc/externals/javelin/lib/Vector.js' => '2caa8fb8',
'rsrc/externals/javelin/lib/WebSocket.js' => '3f840822',
@@ -672,7 +672,7 @@
'javelin-resource' => '44959b73',
'javelin-routable' => 'b3e7d692',
'javelin-router' => '29274e2b',
- 'javelin-scrollbar' => 'ef2ec0c6',
+ 'javelin-scrollbar' => '5b2f5a08',
'javelin-stratcom' => '6c53634d',
'javelin-tokenizer' => '7644823e',
'javelin-typeahead' => '70baed2f',
@@ -1186,6 +1186,12 @@
'javelin-vector',
'javelin-dom',
),
+ '5b2f5a08' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-vector',
+ ),
'5bc2cb21' => array(
'javelin-behavior',
'javelin-stratcom',
@@ -1863,12 +1869,6 @@
'phabricator-phtize',
'javelin-dom',
),
- 'ef2ec0c6' => array(
- 'javelin-install',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-vector',
- ),
'efe49472' => array(
'javelin-install',
'javelin-util',
diff --git a/webroot/rsrc/externals/javelin/lib/Scrollbar.js b/webroot/rsrc/externals/javelin/lib/Scrollbar.js
--- a/webroot/rsrc/externals/javelin/lib/Scrollbar.js
+++ b/webroot/rsrc/externals/javelin/lib/Scrollbar.js
@@ -308,22 +308,30 @@
* Figure out the correct size and offset of the scrollbar handle.
*/
_resizeBar: function() {
+ // We're hiding and showing the bar itself, not just the handle, because
+ // pages that contain other panels may have scrollbars underneath the
+ // bar. If we don't hide the bar, it ends up eating clicks targeting
+ // these panels.
+
+ // Because the bar may be hidden, we can't measure it. Measure the
+ // viewport instead.
+
var cdim = JX.Vector.getDim(this._content);
var spos = JX.Vector.getAggregateScrollForNode(this._viewport);
- var bdim = JX.Vector.getDim(this._bar);
+ var vdim = JX.Vector.getDim(this._viewport);
- var ratio = bdim.y / cdim.y;
+ var ratio = vdim.y / cdim.y;
var offset = Math.round(ratio * spos.y) + 2;
- var size = Math.floor(ratio * (bdim.y - 2)) - 2;
+ var size = Math.floor(ratio * (vdim.y - 2)) - 2;
if (size < cdim.y) {
this._handle.style.top = offset + 'px';
this._handle.style.height = size + 'px';
- JX.DOM.show(this._handle);
+ JX.DOM.show(this._bar);
} else {
- JX.DOM.hide(this._handle);
+ JX.DOM.hide(this._bar);
}
},

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 6:40 PM (3 d, 7 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726458
Default Alt Text
D11560.diff (2 KB)

Event Timeline