Page MenuHomePhabricator

Text with characters typed with compose key (or similar) disappear partially after syntax higlighting turned off
Open, Needs TriagePublicBUG REPORT

Description

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

  • In Firefox browser under un*x like operating system with X11/Xorg, start editing a Wikipedia page using an (non-visual) editor. (example sandbox link)
  • Turn syntax highlighting on (right-most toolbar icon looking like a marker).
  • Type a text (without a newline) with some characters typed using compose keys or so, e.g.
    • character "å" (å typed as Compose a a )
    • first … last ( typed as Compose . . )
    • Müller (ü typed as ¨ u, or Compose u " )
  • Turn syntax highlighting off again. Or, save the edit instead (plan B).

What happens?:

  • Trailing text starting with a first character specially typed disappear, leaving only:
    • character "
    • first
    • M
  • If plan B was used, corrupted text was saved possibly without editor even being aware of it (see result diff of simpler test similar to middle example (a … b), like one captured in video below, but logged-in user session here.)

Other information (browser name/version, screenshots, etc.):

GNU/Linux or *BSD, Firefox browser (recent version, but the issue is many many months or years old), verified in:

  • Arch linux, Xorg, Firefox 144.0
    • (setxkbmap -layout us,cz -variant ,qwerty -option grp:switch, +AltGr compose key)
  • OpenBSD 7.8, Firefox 144.0 (pkg_add firefox) (different machine; also re-cheched in libvirt / KVM virtual machine)
    • (AltGr compose key enabled with setxkbmap -option compose:ralt)
  • Debian 13 (trixie), Xfce desktop, Firefox 140.4.0esr
    • (compose key enabled like above)

Wikipedia-bug-editor-syntax-highlighting-off-compose-text-disappearing-20251025.apng (600×800 px, 140 KB)
simple example (APNG animation)

Always tested in new empty FF profile created (firefox -P).

Was not able to reproduce in

  • Google Chrome
  • Opera browser
  • Windows 11, Edge browser and Firefox
  • Debian 13 (trixie), GNOME (Wayland), Firefox esr; compose key enabled in settings
  • Ubuntu 22.04 LTS (22.04.5), Firefox 144.0 (libvirt / KVM virtual machine)
  • Ubuntu 24.04 LTS (24.04.3), Firefox 144.0 (libvirt / KVM virtual machine)
  • Fedora 42 live CD
  • current testwiki (looks different, "Syntax" label next to the icon)

Event Timeline

mykhal updated the task description. (Show Details)
mykhal renamed this task from Typed text starting with characters typed with compose key (or similar) disappear after syntax higlighting turned off to Text with characters typed with compose key (or similar) disappear partially after syntax higlighting turned off.Oct 25 2025, 2:20 PM
mykhal updated the task description. (Show Details)
mykhal updated the task description. (Show Details)

.. just a note on linking to CodeMirror 5 (legacy): current enwiki production version is 6.0.0, having the bug (too)

.. just a note on linking to CodeMirror 5 (legacy): current enwiki production version is 6.0.0, having the bug (too)

It absolutely does, because it is indeed CodeMirror 5. You need to enable CodeMirror 6 from the beta features.

Slight update: currently not being able to reproduce the bug in Arch Linux scenario (the same machine/system, not sure what's the "problem"),
but reproduced successfully in OpenBSD (the same machine/system), Firefox version 146.0.1 in both cases; also reproduced in Debian Trixie, Firefox 140.6.0esr.

I've also check if the bug depends specifically on particular modifier key (like Shift, Alt) press used in compose key ~prefix combination. Probably not, nothing seems to change (same bug) if e.g. CapsLock is used as compose key (setxkbmap -option compose:caps) instead.

@mykhal Could you enable the "Improved Syntax Highlighting" beta feature on https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-betafeatures and try again?

@Bhsd Yes, I already did try the new (non-"legacy") version, as suggested before. The bug does not occur in it.

(Which does not prevent me from adding more details about existing "legacy" code used in production.)