1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Only prevent drag-scroll in the Y direction on workboards

Summary: This scroll lock thing prevented both X and Y scrolling, but should only prevent Y scrolling. Dragging a card to the edge to scroll left/right is fine.

Test Plan: Scrolled a workboard left/right by dragging a card to the edge.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15213
This commit is contained in:
epriestley 2016-02-08 10:03:09 -08:00
parent 39dc2c038d
commit d78061d820
3 changed files with 21 additions and 14 deletions

View file

@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => 'b4a7e275',
'core.pkg.js' => '771b0e84',
'core.pkg.js' => '17380dd3',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '2de124c9',
'differential.pkg.js' => 'd0cd0df6',
@ -447,7 +447,7 @@ return array(
'rsrc/js/application/uiexample/notification-example.js' => '8ce821c5',
'rsrc/js/core/Busy.js' => '59a7976a',
'rsrc/js/core/DragAndDropFileUpload.js' => '81f182b5',
'rsrc/js/core/DraggableList.js' => '8199fb41',
'rsrc/js/core/DraggableList.js' => '705df8d1',
'rsrc/js/core/FileUpload.js' => '680ea2c8',
'rsrc/js/core/Hovercard.js' => '1bd28176',
'rsrc/js/core/KeyboardShortcut.js' => '1ae869f2',
@ -742,7 +742,7 @@ return array(
'phabricator-countdown-css' => 'e7544472',
'phabricator-dashboard-css' => 'eb458607',
'phabricator-drag-and-drop-file-upload' => '81f182b5',
'phabricator-draggable-list' => '8199fb41',
'phabricator-draggable-list' => '705df8d1',
'phabricator-fatal-config-template-css' => '8e6c6fcd',
'phabricator-feed-css' => 'ecd4ec57',
'phabricator-file-upload' => '680ea2c8',
@ -1352,6 +1352,14 @@ return array(
'javelin-typeahead',
'javelin-uri',
),
'705df8d1' => array(
'javelin-install',
'javelin-dom',
'javelin-stratcom',
'javelin-util',
'javelin-vector',
'javelin-magical-init',
),
'70baed2f' => array(
'javelin-install',
'javelin-dom',
@ -1441,14 +1449,6 @@ return array(
'javelin-vector',
'javelin-stratcom',
),
'8199fb41' => array(
'javelin-install',
'javelin-dom',
'javelin-stratcom',
'javelin-util',
'javelin-vector',
'javelin-magical-init',
),
'81f182b5' => array(
'javelin-install',
'javelin-util',

View file

@ -29,7 +29,7 @@ final class PHUIWorkboardView extends AphrontTagView {
'div',
array(
'class' => 'phui-workboard-view-shadow',
'sigil' => 'workboard-shadow lock-scroll-while-dragging',
'sigil' => 'workboard-shadow lock-scroll-y-while-dragging',
),
$view);

View file

@ -664,14 +664,21 @@ JX.install('DraggableList', {
// In Safari, we'll eventually reach `window.document`, which is not
// sufficently node-like to support sigil tests.
var lock;
var lock = false;
if (container === window.document) {
lock = false;
} else {
// Some elements may respond to, e.g., `scrollTop` adjustment, even
// though they are not scrollable. This sigil disables adjustment
// for them.
lock = JX.Stratcom.hasSigil(container, 'lock-scroll-while-dragging');
var lock_sigil;
if (property == 'scrollTop') {
lock_sigil = 'lock-scroll-y-while-dragging';
}
if (lock_sigil) {
lock = JX.Stratcom.hasSigil(container, lock_sigil);
}
}
if (!lock) {