Page MenuHomePhabricator

Using Compose key causes edits to be lost
Open, In Progress, MediumPublicBUG REPORT

Description

I've noticed recently that sometimes, if I use the Compose key (a Linux feature for typing special characters), and I'm using the source editor with syntax highlighting enabled, the special character and everything after it will not be submitted when I click "publish changes". I first noticed the issue on Commons, but I was also able to reproduce it on test2.wikipedia.org.

Steps to replicate the issue (include links if applicable):

  • Start editing a page with the source editor with syntax highlighting enabled.
  • Use the Compose key to type a character (I've tested with – and ñ).
  • You may continue typing more text after using the Compose key. However, if you press Backspace or move your text cursor at all (with the mouse or the arrow keys), the bug will not occur.
  • Publish your changes.

So, for example, you might try editing a page and adding the word "español", using the Compose key to type the 'ñ' character (this is done by pressing Compose, then N, then Shift+`).

What happens?: The special character and all subsequent text you typed will not appear on the saved page (e.g. if you wrote "español", the saved page will just say "espa").

What should have happened instead?: The full text should have been saved (e.g. the full word "español" should appear on the saved page).

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
I'm using Firefox Browser 109.0 (64-bit) on Ubuntu 22.04.1 LTS using the X11 windowing system. The Compose key is bound to Right Alt on my system.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
IagoQnsi renamed this task from Using compose key causes edits to be lost to Using Compose key causes edits to be lost.Jan 23 2023, 2:29 AM
IagoQnsi updated the task description. (Show Details)

Noticed this in some build artifacts of test failure when investigating T324879, I thought that was some unexpected state of the CodeMirror since it was not fully loaded/unloaded before typing.

But if the same thing can happen during daily use, then it may be worth adding edit tests for CodeMirror that target the 2010 editor.

@MusikAnimal adding you as CodeMirror is mentioned. To me, it seems there's a suitable, yet annoying workaround which is to move the cursor or press backspace before submitting edits. Still, given our work on CodeMirror, perhaps this should be a test criteria.

Hmm, I'm not able to reproduce this using either CodeMirror 5 (the version for which this bug was reported), nor with the upcoming CodeMirror 6 upgrade. At any rate, I agree it makes sense to include this as something for QA to check. I'm going to write up a test plan soon, and I'll be sure to include this.

JWheeler-WMF changed the task status from Open to In Progress.Mar 26 2024, 9:43 PM
JWheeler-WMF triaged this task as Medium priority.