From 2a9c42ba144897cf9721e432612e823e46d5e361 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 1 Oct 2021 19:03:48 -0700 Subject: [PATCH] crmMonaco - Optionally listen to `ng-disabled` attribute --- ang/crmMonaco.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ang/crmMonaco.js b/ang/crmMonaco.js index 3d6ff667f4..6a451b0a63 100644 --- a/ang/crmMonaco.js +++ b/ang/crmMonaco.js @@ -65,6 +65,12 @@ // FIXME: else: retry? }; + if ($attr.ngDisabled) { + $scope.$watch($parse($attr.ngDisabled), function(disabled){ + editor.updateOptions({readOnly: disabled}); + }); + } + // FIXME: This makes vertical scrolling much better, but horizontal is still weird. var origOverflow; function bodyScrollSuspend() { -- 2.25.1