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
F14077257: D20640.id49235.diff
Thu, Nov 21, 10:10 PM
F14075478: D20640.id49235.diff
Thu, Nov 21, 11:35 AM
Unknown Object (File)
Tue, Nov 19, 9:24 PM
Unknown Object (File)
Mon, Nov 18, 6:24 AM
Unknown Object (File)
Mon, Nov 18, 3:21 AM
Unknown Object (File)
Mon, Nov 18, 2:18 AM
Unknown Object (File)
Sat, Nov 16, 9:07 PM
Unknown Object (File)
Thu, Oct 31, 7:38 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