Page MenuHomePhabricator

style of <inputbox> inputfield is copied to editbox and summary in preview mode
Closed, ResolvedPublic

Description

If there is an <inputbox> tag on a page and you edit this page, the style of the <inputbox> inputfield is copied to the editbox and the summary field in preview mode. The monospace font of the editbox is lost and a blue line appears at the left side of the editbox and the summary field. Happens on english and german wiktionary since 1.25wmf20.

  1. goto en.wiktionary.org
  2. select a random page
  3. Press edit-tab
  4. notice: monospace font in editbox!
  5. enter the folling three lines somewhere on the page:

<inputbox>
type=create
</inputbox>

  1. Press "show preview" Button
  2. notice: monospace font in editbox is lost and a blue line at the left side of the editbox and the summary field appears during input

Event Timeline

Formatierer raised the priority of this task from to Needs Triage.
Formatierer updated the task description. (Show Details)
Formatierer added a subscriber: Formatierer.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 12 2015, 2:04 PM
FriedhelmW triaged this task as Unbreak Now! priority.Mar 12 2015, 7:44 PM
FriedhelmW added a subscriber: FriedhelmW.
Aklapper lowered the priority of this task from Unbreak Now! to Normal.Mar 13 2015, 8:59 AM
Aklapper added a project: Regression.
matmarex raised the priority of this task from Normal to High.Mar 13 2015, 6:39 PM
matmarex updated the task description. (Show Details)
matmarex added a subscriber: Jdlrobson.
matmarex added a subscriber: matmarex.

This is triggered by the InputBox extension, but the problem lies somewhere else.

Since 99277a4d0fea425a90af6b6be713e5015d7b3c48, InputBox uses "MediaWiki UI" styles for its own form fields (example: F89124). This requires loading additional style modules that are not present on all pages, in particular mediawiki.ui.input, which applies the styling seen in the screenshot linked above to all text fields with the .mw-ui-input CSS class.

It turns out that, for some reason, the main edit box (<textarea id="wpTextbox1" …>) also has this class, even without InputBox being present – it's just that the styles were previously not being loaded. It probably shouldn't have it unless $wgUseMediaWikiUIEverywhere configuration variable is enabled (and it is false by default, and on Wikimedia wikis). I think Jon was the primary person caring about that configuration variable :)

If I remember correctly, the Design team does intend for this to become the styling for all text boxes, but this has been questioned e.g. on T72028. We definitely shouldn't do this now by accident (and possibly not at all, but that's a different discussion); T72028 is probably a good place to have it.

(Hmm, and an issue similar to this was also raised on T72028.)

Change 196623 had a related patch set uploaded (by Bartosz Dziewoński):
Html: Make addition of 'mw-ui-input' conditional on $wgUseMediaWikiUIEverywhere

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

Change 196623 merged by jenkins-bot:
Html: Make addition of 'mw-ui-input' conditional on $wgUseMediaWikiUIEverywhere

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

He7d3r added a subscriber: He7d3r.Mar 14 2015, 3:17 AM
Florian closed this task as Resolved.Mar 15 2015, 12:35 AM
Florian claimed this task.
Florian added a subscriber: Florian.

The problem is resolved with the change of @matmarex :)

Ricordisamoa reassigned this task from Florian to matmarex.Mar 15 2015, 11:16 AM
Ricordisamoa removed a project: Patch-For-Review.
Ricordisamoa added a subscriber: Ricordisamoa.

Yeah. The change will be deployed to Wiktionaries on Tuesday, 24 March 2015, per https://www.mediawiki.org/wiki/MediaWiki_1.25/Roadmap. It could be scheduled for an earlier SWAT deployment (https://wikitech.wikimedia.org/wiki/Deployments), but I personally won't be able to babysit it.

Another 10 days for Wikipedia? Come on, please be faster...

Change 196896 had a related patch set uploaded (by Florianschmidtwelzow):
Html: Make addition of 'mw-ui-input' conditional on $wgUseMediaWikiUIEverywhere

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

Change 196897 had a related patch set uploaded (by Florianschmidtwelzow):
Html: Make addition of 'mw-ui-input' conditional on $wgUseMediaWikiUIEverywhere

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

Thanks @matmarex for the info :) I have cherry picked it and will plan a SWAT for it.

Change 196896 merged by jenkins-bot:
Html: Make addition of 'mw-ui-input' conditional on $wgUseMediaWikiUIEverywhere

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

Change 196897 merged by jenkins-bot:
Html: Make addition of 'mw-ui-input' conditional on $wgUseMediaWikiUIEverywhere

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

Florian added a subscriber: Anomie.Mar 16 2015, 3:36 PM

@WeernFootis1 and @all: The change is now (like @gerritbot wrote) merged and it was deployed just a moment ago by @Anomie (thanks!). All wmf-wikis now works as expected :)