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
F15453925: D20640.id49235.diff
Sat, Mar 29, 3:10 PM
F15449274: D20640.id.diff
Fri, Mar 28, 9:15 AM
F15445603: D20640.diff
Thu, Mar 27, 2:57 PM
F15443840: D20640.diff
Thu, Mar 27, 6:27 AM
F15438342: D20640.id49240.diff
Wed, Mar 26, 12:14 AM
F15438340: D20640.id49235.diff
Wed, Mar 26, 12:14 AM
F15421114: D20640.diff
Fri, Mar 21, 9:07 PM
F15382417: D20640.diff
Fri, Mar 14, 12:17 PM
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