Skip to content

Commit

Permalink
Fix ios editor height display incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora committed Aug 26, 2024
1 parent 5581731 commit 07ee2d4
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions lib/src/editor.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:io';
import 'dart:math' hide log;

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
Expand Down Expand Up @@ -959,19 +958,6 @@ pre {
Future<void> _onContentSizeChangedOnIOS(
InAppWebViewController controller,
Size oldContentSize,
Size newContentSize
) async {
if (_isFocusing) {
return;
}

final contentHeight = max(oldContentSize.height, newContentSize.height);
log('HtmlEditorState::_onContentSizeChanged:contentHeight: $contentHeight');
final documentHeight = _documentHeight ?? 0;
if (contentHeight > documentHeight && mounted) {
setState(() {
_documentHeight = contentHeight + _offsetHeight;
});
}
}
Size newContentSize,
) => onDocumentChanged();
}

0 comments on commit 07ee2d4

Please sign in to comment.