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
F19508782: D20640.diff
Sat, Jan 10, 10:21 AM
F19507143: D20640.id49240.diff
Fri, Jan 9, 5:48 PM
F19507140: D20640.id49235.diff
Fri, Jan 9, 5:48 PM
F19503561: D20640.diff
Fri, Jan 9, 12:21 AM
F19249831: D20640.id49235.diff
Mon, Dec 22, 7:16 AM
F19189142: D20640.id49235.diff
Tue, Dec 16, 8:03 AM
F18992132: D20640.diff
Nov 19 2025, 12:56 AM
F18875864: D20640.id.diff
Nov 5 2025, 7:51 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
Branch
double-close
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23104
Build 31722: Run Core Tests
Build 31721: arc lint + arc unit