diff --git a/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift b/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift index 1ca29d4987efc7..946f2bb05e9681 100644 --- a/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift +++ b/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift @@ -134,7 +134,7 @@ class RCTAztecView: Aztec.TextView { delegate = self textContainerInset = .zero contentInset = .zero - textContainer.lineFragmentPadding = 0 + textContainer.lineFragmentPadding = 0 addPlaceholder() textDragInteraction?.isEnabled = false storage.htmlConverter.characterToReplaceLastEmptyLine = Character(.zeroWidthSpace) @@ -197,6 +197,14 @@ class RCTAztecView: Aztec.TextView { } } + override func sizeThatFits(_ size: CGSize) -> CGSize { + // Set the Placeholder height as the minimum TextView height. + let minimumHeight = placeholderLabel.frame.height + let fittingSize = super.sizeThatFits(size) + let height = max(fittingSize.height, minimumHeight) + return CGSize(width: fittingSize.width, height: height) + } + func updateContentSizeInRN() { let newSize = sizeThatFits(frame.size) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index d9372ce8be0c7b..41739d73027784 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -13,6 +13,7 @@ For each user feature we should also add a importance categorization label to i ## 1.35.0 +* [***] Fixed empty text fields on RTL layout. Now they are selectable and placeholders are visible. * [**] Add settings to allow changing column widths * [**] Media editing support in Gallery block.