Fix history and add section tabs being collapsed on RTL wikis
authorAlex Monk <krenair@gmail.com>
Tue, 25 Jun 2013 23:44:42 +0000 (00:44 +0100)
committerMatmarex <matma.rex@gmail.com>
Wed, 26 Jun 2013 00:38:53 +0000 (00:38 +0000)
The module is now loaded in the 'top' queue instead of the 'bottom'
one, so the <body> tag isn't loaded when the RTL detection is done.
Use the <html> tag's 'dir' attribute instead.

Bug: 50196
Change-Id: I6e277a9503a1e6003bc7bf9f9468ed7b35552e60

skins/vector/collapsibleTabs.js

index ad77c36..eb84325 100644 (file)
@@ -2,7 +2,7 @@
  * Collapsible tabs jQuery Plugin
  */
 ( function ( $ ) {
-       var rtl = $( 'body' ).is( '.rtl' );
+       var rtl = $( 'html' ).attr( 'dir' ) === 'rtl';
        $.fn.collapsibleTabs = function ( options ) {
                // return if the function is called on an empty jquery object
                if ( !this.length ) {