From 8a5ddef6fb47c6d7dc19c100b01396e3c054b7d5 Mon Sep 17 00:00:00 2001 From: Ken Hoes Date: Tue, 12 Jul 2016 09:48:22 -0400 Subject: [PATCH] Correctly redraw codemirror instance on invalid json error --- awx/ui/client/src/helpers/Parse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/helpers/Parse.js b/awx/ui/client/src/helpers/Parse.js index 8057270b4a..c484963162 100644 --- a/awx/ui/client/src/helpers/Parse.js +++ b/awx/ui/client/src/helpers/Parse.js @@ -71,7 +71,7 @@ export default } catch (e) { Alert('Parse Error', 'Failed to parse valid YAML. ' + e.message); - setTimeout( function() { scope.$apply( function() { scope[model] = 'yaml'; createField(); }); }, 500); + setTimeout( function() { scope.$apply( function() { scope[model] = 'yaml'; createField(onReady, onChange, fld); }); }, 500); } } else { @@ -89,7 +89,7 @@ export default } catch (e) { Alert('Parse Error', 'Failed to parse valid JSON. ' + e.message); - setTimeout( function() { scope.$apply( function() { scope[model] = 'json'; createField(); }); }, 500 ); + setTimeout( function() { scope.$apply( function() { scope[model] = 'json'; createField(onReady, onChange, fld); }); }, 500 ); } } };