Page MenuHomePhabricator

Fix double-close on dialogs leading to Javascript console error
ClosedPublic

Authored by epriestley on Jul 3 2019, 3:19 PM.
Tags
None
Referenced Files
F15560897: D20640.id49235.diff
Tue, Apr 29, 5:09 PM
F15554646: D20640.id.diff
Mon, Apr 28, 7:54 AM
F15549333: D20640.diff
Sun, Apr 27, 5:07 AM
F15532219: D20640.id49235.diff
Wed, Apr 23, 2:47 PM
F15519332: D20640.id49235.diff
Sat, Apr 19, 9:49 PM
F15518373: D20640.id.diff
Sat, Apr 19, 1:04 PM
F15491549: D20640.id49235.diff
Sat, Apr 12, 4:48 AM
F15488712: D20640.diff
Fri, Apr 11, 1:56 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable