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
F13050903: D20640.id49240.diff
Fri, Apr 19, 3:16 AM
F13050902: D20640.id49235.diff
Fri, Apr 19, 3:16 AM
F13050901: D20640.id.diff
Fri, Apr 19, 3:16 AM
Unknown Object (File)
Thu, Apr 11, 8:41 AM
Unknown Object (File)
Thu, Apr 11, 4:24 AM
Unknown Object (File)
Thu, Apr 4, 12:50 AM
Unknown Object (File)
Sun, Mar 31, 9:29 AM
Unknown Object (File)
Sat, Mar 30, 8:21 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