MOBILE-2456 format-text: Fix collapse in iOS

main
Dani Palou 2018-07-06 17:15:08 +02:00
parent ba2531fb74
commit a20c496216
1 changed files with 6 additions and 0 deletions

View File

@ -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);