Fix: cannot select text in plain text mode in Rich Text Editor

This commit is contained in:
Jorge Martín 2023-01-30 12:10:28 +01:00
parent 3ab465ea93
commit d5bd05d0bb
3 changed files with 2 additions and 2 deletions

1
changelog.d/7801.bugfix Normal file
View file

@ -0,0 +1 @@
Cannot select text properly in plain text mode when using Rich Text Editor.

View file

@ -15,7 +15,6 @@
<item name="android:background">@android:color/transparent</item>
<item name="android:inputType">textCapSentences|textMultiLine</item>
<item name="android:maxLines">10</item>
<item name="android:minHeight">40dp</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingBottom">10dp</item>
<item name="paddingStart">12dp</item>

View file

@ -291,7 +291,7 @@ internal class RichTextComposerLayout @JvmOverloads constructor(
private fun updateEditTextVisibility() {
views.richTextComposerEditText.isVisible = isTextFormattingEnabled
views.richTextMenu.isVisible = isTextFormattingEnabled
views.richTextMenuScrollView.isVisible = isTextFormattingEnabled
views.plainTextComposerEditText.isVisible = !isTextFormattingEnabled
// The layouts for formatted text mode and plain text mode are different, so we need to update the constraints