Commit 338b4cb2 authored by epriestley's avatar epriestley
Browse files

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
parent d4491ddc
......@@ -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',
......
......@@ -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),
' ',
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment