From 832b2e0dbe287062b803b96c7b63057a4c84dfa3 Mon Sep 17 00:00:00 2001 From: Nick Bradbury Date: Tue, 11 Apr 2023 13:35:28 -0400 Subject: [PATCH 1/5] Catch "Center point is not inside any of the rectangle" exception --- .../main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt index bbf1fb645..336af1ac5 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt @@ -64,6 +64,10 @@ class AztecExceptionHandler(private var logHelper: WeakReference Date: Wed, 12 Apr 2023 08:32:32 -0400 Subject: [PATCH 2/5] Limit fix to TIRAMISU --- .../main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt index 336af1ac5..d6fb44047 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt @@ -65,7 +65,9 @@ class AztecExceptionHandler(private var logHelper: WeakReference Date: Wed, 12 Apr 2023 12:44:47 -0400 Subject: [PATCH 3/5] Removed TIRAMISU check --- .../main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt index d6fb44047..336af1ac5 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt @@ -65,9 +65,7 @@ class AztecExceptionHandler(private var logHelper: WeakReference Date: Fri, 14 Apr 2023 08:55:59 -0400 Subject: [PATCH 4/5] Removed exception --- .../main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt index 336af1ac5..5d50737f9 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecExceptionHandler.kt @@ -64,12 +64,7 @@ class AztecExceptionHandler(private var logHelper: WeakReference Date: Fri, 14 Apr 2023 09:04:12 -0400 Subject: [PATCH 5/5] don't enable select all for empty text --- aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt index c2800b632..e07f91646 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/AztecText.kt @@ -1891,6 +1891,14 @@ open class AztecText : AppCompatEditText, TextWatcher, UnknownHtmlSpan.OnUnknown return super.onTextContextMenuItem(id) } } + android.R.id.selectAll -> { + return if (text.toString() == Constants.END_OF_BUFFER_MARKER.toString()) { + deleteInlineStyleFromTheBeginning() + return true + } else { + super.onTextContextMenuItem(id) + } + } else -> return super.onTextContextMenuItem(id) }