mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 00:10:57 +01:00
Fix mouse access to Workboard scrollbars
Summary: Fixes T7075. The invisible "fancy" scrollbar was covering these; hide it more aggressively. Test Plan: - Scrollbars on Workboards can now be interacted with directly. - Normal scrollable and unscrollable pages work as expected. - Resized some windows. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T7075 Differential Revision: https://secure.phabricator.com/D11560
This commit is contained in:
parent
31c64b6772
commit
08045efb30
2 changed files with 21 additions and 13 deletions
|
@ -199,7 +199,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' => '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 @@ return array(
|
|||
'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 @@ return array(
|
|||
'javelin-vector',
|
||||
'javelin-dom',
|
||||
),
|
||||
'5b2f5a08' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-vector',
|
||||
),
|
||||
'5bc2cb21' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -1863,12 +1869,6 @@ return array(
|
|||
'phabricator-phtize',
|
||||
'javelin-dom',
|
||||
),
|
||||
'ef2ec0c6' => array(
|
||||
'javelin-install',
|
||||
'javelin-dom',
|
||||
'javelin-stratcom',
|
||||
'javelin-vector',
|
||||
),
|
||||
'efe49472' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
|
|
18
webroot/rsrc/externals/javelin/lib/Scrollbar.js
vendored
18
webroot/rsrc/externals/javelin/lib/Scrollbar.js
vendored
|
@ -308,22 +308,30 @@ JX.install('Scrollbar', {
|
|||
* 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);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue