Merge pull request #1405 from dpalou/MOBILE-2456

MOBILE-2456 format-text: Fix collapse in iOS
main
Juan Leyva 2018-07-06 17:34:36 +02:00 committed by GitHub
commit d2b175ef0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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. this.element.innerHTML = ''; // Remove current contents.
if (this.maxHeight && div.innerHTML != '') { 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. // Move the children to the current element to be able to calculate the height.
this.domUtils.moveChildren(div, this.element); this.domUtils.moveChildren(div, this.element);