Page MenuHomePhabricator

textarea loses focus after disabling syntax highlighting
Open, Needs TriagePublicBUG REPORT

Description

What is the problem?

Editing the 2017 Wikitext editor with syntax highlighting enabled, if I disable syntax highlighting the textarea loses focus.

I have to click on the textarea again to continue editing.

Steps to reproduce problem
  1. Enable 2017 wikitext editor in Special:Preferences#mw-prefsection-editing
  2. Edit an article in source mode
  3. Click the burger menu and click "Syntax highlighting" to enable it
  4. Make sure the textarea has focus (perhaps type a few things)
  5. Click "Syntax highlighting" again to disable it

Expected behaviour: Focus remains where you were typing before disabling Syntax highlighting.
Observed behaviour: Focus is lost. If you type anything, nothing will happen.

Environment

Operating system: Debian 12 (Bookworm).
Browser: Firefox 128. Chromium 131.
Wiki(s): https://en.wikipedia.beta.wmflabs.org MediaWiki 1.44.0-alpha (c581ab4) 12:40, 27 November 2024.
Editor: VisualEditor – (e0b1d0f) 07:22, 27 November 2024. CodeMirror 6.0.0 (55b81f7) 07:20, 27 November 2024.