1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +01:00

Prevent workboard cards from being grabbed by the "Txxx" object name text

Summary:
Fixes T13452. We currently give users mixed signals about the interaction mode of this text: the cursor says "text" but the behavior is "grab".

Make the behavior "text" to align with the cursor. An alternate variation of this change is to remove the cursor, but this is preferable if it doesn't cause problems, since copying the task ID is at least somewhat useful.

Test Plan: In Safari, Firefox, and Chrome: selected and copied object names from workboard cards; and dragged workboard cards by other parts of their UI.

Maniphest Tasks: T13452

Differential Revision: https://secure.phabricator.com/D20898
This commit is contained in:
epriestley 2019-11-08 08:17:45 -08:00
parent d4491ddc22
commit 338b4cb2e7
3 changed files with 22 additions and 12 deletions

View file

@ -10,7 +10,7 @@ return array(
'conpherence.pkg.css' => '3c8a0668',
'conpherence.pkg.js' => '020aebcf',
'core.pkg.css' => '77de226f',
'core.pkg.js' => '6e5c894f',
'core.pkg.js' => '705aec2c',
'differential.pkg.css' => '607c84be',
'differential.pkg.js' => '1b97518d',
'diffusion.pkg.css' => '42c75c37',
@ -448,7 +448,7 @@ return array(
'rsrc/js/application/uiexample/notification-example.js' => '29819b75',
'rsrc/js/core/Busy.js' => '5202e831',
'rsrc/js/core/DragAndDropFileUpload.js' => '4370900d',
'rsrc/js/core/DraggableList.js' => 'c9ad6f70',
'rsrc/js/core/DraggableList.js' => '0169e425',
'rsrc/js/core/Favicon.js' => '7930776a',
'rsrc/js/core/FileUpload.js' => 'ab85e184',
'rsrc/js/core/Hovercard.js' => '074f0783',
@ -777,7 +777,7 @@ return array(
'phabricator-diff-changeset-list' => '0f5c016d',
'phabricator-diff-inline' => 'a4a14a94',
'phabricator-drag-and-drop-file-upload' => '4370900d',
'phabricator-draggable-list' => 'c9ad6f70',
'phabricator-draggable-list' => '0169e425',
'phabricator-fatal-config-template-css' => '20babf50',
'phabricator-favicon' => '7930776a',
'phabricator-feed-css' => 'd8b6e3f8',
@ -920,6 +920,14 @@ return array(
'javelin-uri',
'phabricator-notification',
),
'0169e425' => array(
'javelin-install',
'javelin-dom',
'javelin-stratcom',
'javelin-util',
'javelin-vector',
'javelin-magical-init',
),
'022516b4' => array(
'javelin-install',
'javelin-util',
@ -2032,14 +2040,6 @@ return array(
'javelin-util',
'phabricator-keyboard-shortcut-manager',
),
'c9ad6f70' => array(
'javelin-install',
'javelin-dom',
'javelin-stratcom',
'javelin-util',
'javelin-vector',
'javelin-magical-init',
),
'cf32921f' => array(
'javelin-behavior',
'javelin-dom',

View file

@ -379,10 +379,11 @@ final class PHUIObjectItemView extends AphrontTagView {
if ($this->objectName) {
$header_name[] = array(
phutil_tag(
javelin_tag(
'span',
array(
'class' => 'phui-oi-objname',
'sigil' => 'ungrabbable',
),
$this->objectName),
' ',

View file

@ -181,6 +181,15 @@ JX.install('DraggableList', {
return;
}
// See T13452. If this is an ungrabble part of the item, don't start a
// drag. We use this to allow users to select text on cards.
var target = e.getTarget();
if (target) {
if (JX.Stratcom.hasSigil(target, 'ungrabbable')) {
return;
}
}
if (JX.Stratcom.pass()) {
// Let other handlers deal with this event before we do.
return;