From e9b52256762dc22a237c92a587d2ba8af8a3f8d9 Mon Sep 17 00:00:00 2001 From: Ollie Philpott Date: Thu, 16 May 2019 15:38:56 +0100 Subject: [PATCH] Updated view source callback to execute correctly --- .../src/common/services/tinymce.service.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 61f96fed28..555e276485 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -360,7 +360,11 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s icon: "code", tooltip: "View Source Code", onclick: function(){ - callback(); + if (callback) { + angularHelper.safeApply($rootScope, function() { + callback(); + }); + } } });