Text spans are not always cleared when switching focus

RESOLVED FIXED in Firefox 40

Status

()

Firefox for Android
Keyboards and IME
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jchen, Assigned: jchen)

Tracking

Trunk
Firefox 40
All
Android
Points:
---

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Sometimes, when focus changes to the current editor, we receive NOTIFY_IME_OF_FOCUS and NOTIFY_IME_OF_BLUR notifications. Then we send a text change notification to replace previous text with the new editor's text. However, sometimes the previous text's spans are left behind and we should clear them.
(Assignee)

Comment 1

3 years ago
Created attachment 8589365 [details] [diff] [review]
Clear spans when initializing for newly-focused editor (v1)

For newly-focused text, we do a simple replacement, which will discard any previous text spans.
Attachment #8589365 - Flags: review?(esawin)
Comment on attachment 8589365 [details] [diff] [review]
Clear spans when initializing for newly-focused editor (v1)

Review of attachment 8589365 [details] [diff] [review]:
-----------------------------------------------------------------

This looks good, I think it might help with some of the issues I've observed, too.

On a side note: we should look into refactoring the span-recovering code block sometime, the selection "clamping" could be extracted and simplified for improved readability.
Attachment #8589365 - Flags: review?(esawin) → review+
https://hg.mozilla.org/mozilla-central/rev/f14333eca8ce
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
You need to log in before you can comment on or make changes to this bug.