diff --git a/UI/Templates/MailerUI/UIxMailEditor.wox b/UI/Templates/MailerUI/UIxMailEditor.wox
index 2b2d71f39c..2df2ac4337 100644
--- a/UI/Templates/MailerUI/UIxMailEditor.wox
+++ b/UI/Templates/MailerUI/UIxMailEditor.wox
@@ -274,13 +274,13 @@
md-autofocus="::!editor.isNew()"
md-no-resize="md-no-resize"
md-no-autogrow="md-no-autogrow"
- sg-autogrow="sg-autogrow"
+ sg-autogrow="!isPopup"
md-detect-hidden="md-detect-hidden" />
-
-
+
+
*/
sgAutogrow.$inject = ['$document', '$timeout'];
function sgAutogrow($document, $timeout) {
return {
restrict: 'A',
+ scope: {
+ autogrow: '=sgAutogrow'
+ },
link: function(scope, elem, attr) {
+ if (!scope.autogrow) return;
+
var textarea = elem[0];
var hiddenDiv = $document[0].createElement('div');
var content = null;
@@ -46,7 +50,6 @@
hiddenDiv.style.visibility = 'hidden';
hiddenDiv.style.display = 'block';
textarea.style.height = hiddenDiv.offsetHeight + 'px';
- console.debug('resize to ' + hiddenDiv.offsetHeight + 'px');
hiddenDiv.style.visibility = 'visible';
hiddenDiv.style.display = 'none';
});