From 7daee5ce0f85a60d354afc11fe750dba9a05f27a Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Fri, 10 Jun 2016 09:31:58 -0700 Subject: [PATCH] fix(draft): delay draft re-opening w/ errors to allow time to close --- src/flux/stores/draft-store.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/flux/stores/draft-store.coffee b/src/flux/stores/draft-store.coffee index ac6913496..23904271b 100644 --- a/src/flux/stores/draft-store.coffee +++ b/src/flux/stores/draft-store.coffee @@ -372,9 +372,12 @@ class DraftStore # We delay so the view has time to update the restored draft. If we # don't delay the modal may come up in a state where the draft looks # like it hasn't been restored or has been lost. + # + # We also need to delay because the old draft window needs to fully + # close. It takes windows currently (June 2016) 100ms to close by _.delay => @_notifyUserOfError({draftClientId, threadId, errorMessage}) - , 100 + , 300 _isPopout: -> NylasEnv.getWindowType() is "composer"