Last modified: 2012-04-12 08:59:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37046, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35046 - [Regression] jquery.ui buttons order reversed in Vector
[Regression] jquery.ui buttons order reversed in Vector
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.19
All All
: High blocker (vote)
: 1.19.0 release
Assigned To: Krinkle
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-07 23:26 UTC by Rainer Rillke @commons.wikimedia
Modified: 2012-04-12 08:59 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rainer Rillke @commons.wikimedia 2012-03-07 23:26:18 UTC
As reported there:
http://labs.wikimedia.beta.wmflabs.org/wiki/Problem_reports#Buttons_exchanged_in_Monobook_--_jQuery.ui.dialog

There must be a way to present the buttons in the same order in vector and monobook.
Comment 1 Mark A. Hershberger 2012-04-04 13:46:20 UTC
Giving this to Timo since I think he had an idea for how to fix it.
Comment 2 Sam Reed (reedy) 2012-04-11 16:22:40 UTC
Is this one actually a regression?
Comment 3 Sumana Harihareswara 2012-04-11 21:44:40 UTC
We decided in IRC that this is not a blocker for the 1.19 tarball release.  "(at the end of the day, it's an annoyance, not anything broken)" says Reedy.  "it is a one line css change" says Krinkle.
Comment 4 Krinkle 2012-04-11 22:02:00 UTC
The Vector css has this non-standard rule:
> .ui-dialog .ui-dialog-buttonpane button { float: right; }

That rule was causing the first button to be on the right, the second button
to be on the left of that and so forth. Per jQuery UI documentation and all
other scripts, plugins and skins ever written by and for jQuery UI, the order
is wrong in Vector, and right in all other skins.

See for example: http://jqueryui.com/demos/dialog/#modal-confirmation

$( "<div>" ).dialog({
	height: 140,
	buttons: {
		"Delete all items": function() {
			$( this ).dialog( "close" );
		},
		Cancel: function() {
			$( this ).dialog( "close" );
		}
	}
});

The "Delete all items" is the first button and "Cancel" to the right of that (as it should be).

That is restored in Vector by removing said css rule from
 /resources/jquery.ui/themes/vector/jquery.ui.dialog.css

and instead adding a float rule for the button container, copied from
the default jQuery UI theme:

 /resources/jquery.ui/themes/default/jquery.ui.dialog.css : line 18

Other plugins/skins are not affected.

https://gerrit.wikimedia.org/r/4757
Comment 5 Rainer Rillke @commons.wikimedia 2012-04-12 08:59:54 UTC
I just like to point out that Monobook used the sorting of the Vector skin in 1.18, too before the complete Monobook-jQuery skin was removed (replaced by some default skin in 1.19) and the problem occurred first.

I am sure this change will cause more than one click on the wrong button but there are more serious issues so I am better quiet here and say thanks.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links