Page MenuHomePhabricator

2017WTE + highlighting (CodeMirror) text layout is off by 1.5em on desktop Minerva
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:
  1. enable "New wikitext mode"
  2. https://www.mediawiki.org/w/index.php?title=Manual:Varnish_caching&action=edit&useskin=minerva
  3. Enable highlighting in hamburger menu if it's not already
  4. Select first line of text: SHIFT-DOWN. The first visible line of text should be highlighted.
  5. Select all text: CTRL-A. All lines should be highlighted.
Actual Results:

The highlights are 1.5em above and to the left of the text which it's supposed to highlight.

Expected Results:

Highlights are placed at the same location as the text.

Solution:

Unset padding: .skin-minerva .ve-init-mw-desktopArticleTarget .CodeMirror { padding: unset; }

Related

The task that revealed this bug: T245476: [SPIKE] How to make source editors' font-size responsive

Screenshot

Note the text selection with light blue background is 1.5em above and left from the text.

WTE2017-minerva-selection-misalignment-T245532.png (771×1 px, 120 KB)

Event Timeline

Restricted Application added subscribers: Masumrezarock100, Aklapper. · View Herald Transcript

Change 572876 had a related patch set uploaded (by Aron Manning; owner: Aron Manning):
[mediawiki/extensions/CodeMirror@master] Fix the font-family: monospace; caused font-size mess-up and remove the unnecessary padding in MinervaNeue skin.

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

Change 573018 had a related patch set uploaded (by Aron Manning; owner: Aron Manning):
[mediawiki/extensions/CodeMirror@master] Remove the unnecessary 1.5em padding in MinervaNeue skin that misaligns highlights.

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

Esanders renamed this task from 2017WTE + highlighting (CodeMirror) text layout is off by 1.5em to 2017WTE + highlighting (CodeMirror) text layout is off by 1.5em on desktop Minerva.Feb 19 2020, 3:37 PM

Change 573018 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Remove the unnecessary 1.5em padding in MinervaNeue skin that misaligns highlights.

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

Demian triaged this task as Medium priority.