From a20c4962162ffd68fa9d113b3732965b73d2c8ee Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 6 Jul 2018 17:15:08 +0200 Subject: [PATCH] MOBILE-2456 format-text: Fix collapse in iOS --- src/directives/format-text.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/directives/format-text.ts b/src/directives/format-text.ts index c03c7e787..5277edef1 100644 --- a/src/directives/format-text.ts +++ b/src/directives/format-text.ts @@ -260,6 +260,12 @@ export class CoreFormatTextDirective implements OnChanges { this.element.innerHTML = ''; // Remove current contents. if (this.maxHeight && div.innerHTML != '') { + + // For some reason, in iOS the inputs and ng-reflect aren't in the DOM sometimes. Add it so styles are applied. + if (!this.element.getAttribute('maxHeight')) { + this.element.setAttribute('maxHeight', String(this.maxHeight)); + } + // Move the children to the current element to be able to calculate the height. this.domUtils.moveChildren(div, this.element);