Page MenuHomePhabricator

CodeMirror uses a different icon for the WikiEditor search button
Closed, ResolvedPublicBUG REPORT

Description

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

  • Enable WikiEditor 2010 toolbar
  • Edit a page
  • Toggle on and off CodeMirror

What happens?:

The icon for the search button changes every time CodeMirror is toggled.

What should have happened instead?:

The icon should remain unchanged.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

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

This is related to the recent icon updates.

Event Timeline

Change #1305613 had a related patch set uploaded (by Zaidusyy; author: Zaidusyy):

[mediawiki/extensions/CodeMirror@master] CodeMirror: Match WikiEditor search button icon

https://gerrit.wikimedia.org/r/1305613

Zaidusyy changed the task status from Open to In Progress.Jun 25 2026, 9:38 AM

Change #1305613 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] CodeMirror: Match WikiEditor search button icon

https://gerrit.wikimedia.org/r/1305613

CodeMirror now uses the new search icon, but somehow the icon size is different.

Change #1307461 had a related patch set uploaded (by Zaidusyy; author: Zaidusyy):

[mediawiki/extensions/CodeMirror@master] Fix CodeMirror toolbar icons scaling mismatch

https://gerrit.wikimedia.org/r/1307461

Thanks @Bhsd for catching this! I looked into it and the SVG itself is exactly the same for both. The issue is just a missing CSS property: CodeMirror's CSS mask was missing mask-size, so it was rigidly stuck at 20px, whereas WikiEditor's button scales dynamically.

I've just submitted a quick follow-up patch to add mask-size: contain, which makes them scale identically

Bhsd moved this task from Bugs to Done on the MediaWiki-extensions-CodeMirror board.

I've just submitted a quick follow-up patch to add mask-size: contain, which makes them scale identically

Thanks for your quick response! Your patch will be deployed next week.

Change #1307461 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] Fix CodeMirror toolbar icons scaling mismatch

https://gerrit.wikimedia.org/r/1307461