Page MenuHomePhabricator

Background color of editor for protected pages is overriden when syntax highlighting is disabled
Closed, DeclinedPublicBUG REPORT

Assigned To
None
Authored By
Andrybak
Sep 11 2021, 11:34 AM
Tags
None
Referenced Files
F34645222: image.png
Sep 16 2021, 5:32 PM
F34640244: image.png
Sep 11 2021, 11:34 AM
F34640246: image.png
Sep 11 2021, 11:34 AM
Subscribers

Description

Steps to reproduce
  1. Open https://en.wikipedia.org/w/index.php?title=Template:Outdent&action=edit
  2. Switch syntax highlighting on and off
Actual result

In one mode of "Syntax highlighting" button, the editor window has pink-ish background color, which is correct.

image.png (277×1 px, 60 KB)

In another – the background is white, which is incorrect.

image.png (276×1 px, 59 KB)

Expected result

In both modes of "Syntax highlighting" button, the editor window has the pink-ish background color.

Notes

CSS rule responsible for correct color is:

.mw-textarea-protected, .mw-textarea-protected + .ui-resizable .ace_content, .mw-textarea-protected + .CodeMirror {
	background-color: #FFE0E0;
}

CSS code responsible for incorrect color is the inline CSS style background-color: transparent; in this HTML snippet, which overrides the rule above:

<textarea aria-label="Wikitext source editor" tabindex="1" class="mw-textarea-protected mw-editfont-monospace" accesskey="," id="wpTextbox1" cols="80" rows="25" style="background-color: transparent; border-radius: 0px; border-style: none; border-width: 0px; box-sizing: border-box; clear: both; color: rgb(0, 0, 0); font-family: monospace, monospace; font-size: 13px; line-height: normal; margin: -65px 0px 0px; overflow: auto scroll; padding: 0px; resize: vertical; tab-size: 4; white-space: pre-wrap; width: 100%; overflow-wrap: normal; height: 0px;" dir="ltr" name="wpTextbox1" lang="en">
[...]

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
MusikAnimal subscribed.

The second screenshot at F34640244 appears to be from the User:Remember the dot/Syntax highlighter user script and not CodeMirror.

I'm not sure what Phabricator projects to use here, but I can confirm this is not a MediaWiki-extensions-CodeMirror issue. CodeEditor is also unrelated.

I suggest closing as invalid and contacting the maintainer of the older syntax highlighter (who doesn't appear to have a Phabricator account).

My bad, I, indeed had the Syntax Highlighter gadget enabled when I made the original screenshots.

However, the bug is still present when the gadget is disabled, so there is a bug elsewhere, not in User:Remember the dot/Syntax highlighter:

image.png (294×905 px, 43 KB)

I don't have permissions to edit https://en.wikipedia.org/w/index.php?title=Template:Outdent&action=edit .... Where are those CSS background color rules defined? Does this also happen when using safemode (see https://www.mediawiki.org/wiki/Help:Locating_broken_scripts )?

Aklapper changed the task status from Open to Stalled.Oct 14 2021, 5:51 AM

Unfortunately closing this Phabricator task as no further information has been provided.

@Andrybak: After you have provided the information asked for and if this still happens, please set the status of this task back to "Open" via the Add Action...Change Status dropdown. Thanks!