@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix double-close on dialogs leading to Javascript console error

Summary:
Ref T13302. The "Close/Cancel" button is currently running two copies of the "dismiss dialog" code, since it's techncally a link with a valid HREF attribute.

An alternate formulation of this is perhaps `if (JX.Stratcom.pass()) { return; }` ("let other handlers react to this event; if something kills it, stop processing"), but `pass()` is inherently someone spooky/fragile so try to get away without it.

Test Plan: Opened the Javascript console, clicked "Edit Task" on a workboard, clicked "Close" on the dialog. Before: event was double-handled leading to a JS error in the console. After: dialog closes uneventfully.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13302

Differential Revision: https://secure.phabricator.com/D20640

+19 -14
+14 -14
resources/celerity/map.php
··· 10 10 'conpherence.pkg.css' => '3c8a0668', 11 11 'conpherence.pkg.js' => '020aebcf', 12 12 'core.pkg.css' => 'af983028', 13 - 'core.pkg.js' => '5a792749', 13 + 'core.pkg.js' => '73a06a9f', 14 14 'differential.pkg.css' => '8d8360fb', 15 15 'differential.pkg.js' => '67e02996', 16 16 'diffusion.pkg.css' => '42c75c37', ··· 253 253 'rsrc/externals/javelin/lib/URI.js' => '2e255291', 254 254 'rsrc/externals/javelin/lib/Vector.js' => 'e9c80beb', 255 255 'rsrc/externals/javelin/lib/WebSocket.js' => 'fdc13e4e', 256 - 'rsrc/externals/javelin/lib/Workflow.js' => '445e21a8', 256 + 'rsrc/externals/javelin/lib/Workflow.js' => '945ff654', 257 257 'rsrc/externals/javelin/lib/__tests__/Cookie.js' => 'ca686f71', 258 258 'rsrc/externals/javelin/lib/__tests__/DOM.js' => '4566e249', 259 259 'rsrc/externals/javelin/lib/__tests__/JSON.js' => '710377ae', ··· 752 752 'javelin-workboard-header' => '111bfd2d', 753 753 'javelin-workboard-header-template' => 'ebe83a6b', 754 754 'javelin-workboard-order-template' => '03e8891f', 755 - 'javelin-workflow' => '445e21a8', 755 + 'javelin-workflow' => '945ff654', 756 756 'maniphest-report-css' => '3d53188b', 757 757 'maniphest-task-edit-css' => '272daa84', 758 758 'maniphest-task-summary-css' => '61d1667e', ··· 1294 1294 '43bc9360' => array( 1295 1295 'javelin-install', 1296 1296 ), 1297 - '445e21a8' => array( 1298 - 'javelin-stratcom', 1299 - 'javelin-request', 1300 - 'javelin-dom', 1301 - 'javelin-vector', 1302 - 'javelin-install', 1303 - 'javelin-util', 1304 - 'javelin-mask', 1305 - 'javelin-uri', 1306 - 'javelin-routable', 1307 - ), 1308 1297 '44f71637' => array( 1309 1298 'javelin-install', 1310 1299 'javelin-dom', ··· 1720 1709 'javelin-dom', 1721 1710 'javelin-typeahead-preloaded-source', 1722 1711 'javelin-util', 1712 + ), 1713 + '945ff654' => array( 1714 + 'javelin-stratcom', 1715 + 'javelin-request', 1716 + 'javelin-dom', 1717 + 'javelin-vector', 1718 + 'javelin-install', 1719 + 'javelin-util', 1720 + 'javelin-mask', 1721 + 'javelin-uri', 1722 + 'javelin-routable', 1723 1723 ), 1724 1724 '94681e22' => array( 1725 1725 'javelin-magical-init',
+5
webroot/rsrc/externals/javelin/lib/Workflow.js
··· 118 118 return; 119 119 } 120 120 121 + // This link is really a dialog button which we'll handle elsewhere. 122 + if (JX.Stratcom.hasSigil(link, 'jx-workflow-button')) { 123 + return; 124 + } 125 + 121 126 // Close the dialog. 122 127 JX.Workflow._pop(); 123 128 },