From 8ca8ac999e7443ad204610614260be8df37b6166 Mon Sep 17 00:00:00 2001 From: Kushagra Gour Date: Wed, 25 Jan 2017 03:25:49 +0530 Subject: [PATCH] defer resize updation to next stack. fixes #51 --- src/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/script.js b/src/script.js index f435c17..febadc0 100644 --- a/src/script.js +++ b/src/script.js @@ -142,7 +142,11 @@ settingsBtn, onboardModal, notificationsBtn, onboardShowInTabOptionBtn, onboardD minSize: 34, gutterSize: 6, onDragEnd: function () { - scope.setPreviewContent(true); + // Running preview updation in next call stack, so that error there + // doesn't affect this dragend listener. + setTimeout(function () { + scope.setPreviewContent(true); + }, 1); } }); }