Skip to content

Commit f824e87

Browse files
authored
Merge pull request #557 from wordpress-mobile/fix/text-after-image
Check the beginning of changed text for images
2 parents f2e425d + 888a92d commit f824e87

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44
### Fixed
5+
- The text handling following immediately after images
56
- Undo/redo edit history
67
- The demo app sample text
78

aztec/src/main/kotlin/org/wordpress/aztec/watchers/FullWidthImageElementWatcher.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class FullWidthImageElementWatcher(aztecText: AztecText) : TextWatcher {
4242
val end = start + count
4343
var lines = aztecText.text.getSpans(start, end, IAztecFullWidthImageSpan::class.java)
4444

45-
// necessary as spans starting at the `end` are not included in the list above
45+
// necessary as spans starting at the `start` and ending at the `end` are not included in the list above
46+
lines += aztecText.text.getSpans(start, start, IAztecFullWidthImageSpan::class.java)
4647
lines += aztecText.text.getSpans(end, end, IAztecFullWidthImageSpan::class.java)
4748

4849
lines.distinct().forEach {

0 commit comments

Comments
 (0)