bug(windows): compatibility with thunderbird/firefox 139.0+ typing space does not correctly align the cursor after the space.
Describe the bug
Reproducible from: https://community.software.sil.org/t/keyman-not-showing-spaces-in-thunderbird/10253
I am using a new Dell Computer and the latest version of Thunderbird for email. Using the Keyman keyboard for my language (Areare), the space bar inserts spaces, but the cursor doesn’t move. Also, the cursor will jump back to the previously typed text if there are other spaces before the cursor that were typed with a standard keyboard
Typing space with keyman keyboard does not correctly align the cursor behind the space.
Reproduce the bug
- Get ThunderBird
v139.0.1 - Click on "+ New Message" in Mail
- Start typing in the Body text with a Keyman keyboard
- Result:
Expected behavior
- Insert space where it is typed
Related issues
No response
Keyman apps
- [ ] Keyman for Android
- [ ] Keyman for iPhone and iPad
- [ ] Keyman for Linux
- [ ] Keyman for macOS
- [x] Keyman for Windows
- [ ] Keyman Developer
- [ ] KeymanWeb
- [ ] Other - give details at bottom of form
Keyman version
19.0.40-alpha
Operating system
Windows 10 Home v2009 (Bootcamp)
Device
MacBook Pro
Target application
Thunderbird v139.0 & v139.0.1
Browser
No response
Keyboard name
areare
Keyboard version
1.1
Language name
alu-Latn-SB
Additional context
Another keyboard: US Basic v1.2 en-us
The issue is found in v139.0 and v139.0.1. Versions below that is fine to use.
May be related to Firefox compatibility issues
That's odd. I'm on Windows 11, Thunderbird 115.9.0 (64-bit) (why the difference in versions?) and am not seeing the issue with his keyboard or with greekclassical. The space shows properly and cursorinɂ is fine. I updated to 115.10.1 (64-bit) and don't see the issue. 115.18.0 (64-bit) and don't see the issue 128.11.0esr (64-bit) and don't see the issue
I'm not beinɂ offered newer versions.
I think we are going to try a bisect to see if this is a new problem with Firefox / Thunderbird, or a long-standing issue. See https://community.software.sil.org/t/keyman-not-showing-spaces-in-thunderbird/10253/4
138.0 works. @Meng-Heng has tested and determined the space issue occurss in version 139.0. Note thunderbird only had two 138 releases. 138.0.1 and 138.0.2 they both work with spaces fine
Edited: Update with newer thunderbird log, and snippets
I was able to test this space problem in Thunderbird 139.0.2
Looking at the log file I can see that when Keyman engines out puts a standard space U+0020. When the context is read again. The space external to Keyman has been converted to +00A0 a NO-BREAK SPACE.
Observing the thunderbird field there is a standard U+0020 space after the cursor
Here is a break down.
We will start once we have typed the text This
(ReadContext uses the TSF)
| Keyman Log | Thunderbird editor |
|---|---|
ln 6417: AITIP::ReadContext: full context [Updateable=0] U+000A U+0054 U+0068 U+0069 U+0073 |
This |
ln 6436: CKeymanEditSession::KeymanProcessOutput: fUpdate = 1, deleting 0, inserting 1 'U+0020 ' |
This Observed in the Thunderbird the text how has This with the space but the cursor is before the space. Pasting the text in to hex reader the spaces is U+0020. |
Key i is pressed |
Key i is pressed |
ln 6516: AITIP::ReadContext: full context [Updateable=0] U+000A U+0054 U+0068 U+0069 U+0073 U+0069 U+0073 U+00A0 We can see fetching the current context using the TSF incorrectly returns a U+00A0 which is no-break space. |
This Thunderbird editor shows a U+0020 after the cursor |
ln 6535: CKeymanEditSession::KeymanProcessOutput: fUpdate = 1, deleting 0, inserting 1 'U+0061 ' |
|
Keyman engine outputs the i |
Observed in Thunderbird the text how has Thisi with the i directly after the s and the cursor still before the space. |
See attached file.
Also attached Firefox version 138.0 space working log
For firefox and writing a email in gmail the space comes in at version 138.0.1 To help look through mozillia https://github.com/mozilla-firefox/firefox/compare/FIREFOX_138_0_RELEASE...FIREFOX_138_0_1_RELEASE
Checked against Thunderbird 139.0.2 (64-bit). Composing a email. It was the same as in Firefox. The output is a U+0020 and the next fetch we recieve U+00A0 a non-breaking space nbsp.
Thunderbird version bisecting of no space insertion. The result is as followed:
| Version | Issue encountered | Notes |
|---|---|---|
| 139.0.2 | Yes | Latest version |
| 139.0.1 | Yes | |
| 139.0 | Yes | Issue started |
| 138.0.2 | No | |
| 138.0.1 | No |
Firefox 139.0 full change log:
- https://bugzilla.mozilla.org/buglist.cgi?j_top=OR&f1=target_milestone&o3=equals&v3=Firefox%20139&o1=equals&resolution=FIXED&o2=anyexact&query_format=advanced&f3=target_milestone&f2=cf_status_firefox139&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&v1=mozilla139&v2=fixed%2Cverified&limit=0
Possibly related:
- 1961521: In contenteditable, typing a Compose sequence after whitespace shifts it to before the whitespace
- 1959352:
WhiteSpaceVisibilityKeeper::NormalizeWhiteSpacesToSplitTextNodeAt()may not retuern proper point if it deletes the lastTextof its parent - 1658699: [meta] Ship Blink-compat white-space normalizer
- 1959323:
HTMLEditor::InsertElementAtSelectionAsActiondeletes preceding block's text when it's called after a block
Reorted to Mozillia 1973626