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

pasted_file (798×1 px, 52 KB)

Event Timeline

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

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

Florian claimed this task.
Florian subscribed.

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

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

@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 :)