diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt b/aztec/src/main/kotlin/org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt index faa049e5f..fb292958b 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/watchers/DeleteMediaElementWatcher.kt @@ -14,7 +14,7 @@ class DeleteMediaElementWatcher(aztecText: AztecText) : TextWatcher { return } - if (count > 0) { + if (count > 0 && count != after) { aztecTextRef.get()?.text?.getSpans(start, start + count, AztecMediaSpan::class.java) ?.forEach { it.onMediaDeleted()