Catrope has submitted this change and it was merged.

Change subject: Fix occasional collapsibleTabs JS error
......................................................................


Fix occasional collapsibleTabs JS error

vector/vector.js depends on $.fn.collapsibleTabs, but that's defined in
vector/collapsibleTabs.js which is loaded *after*. The only reason it
worked most of the time is because the invocation is wrapped in a document
ready callback. Most of the time, the document isn't ready yet when
vector.js runs, so the callback is deferred and $.fn.collapsibleTabs is
created before the callback runs. But if the document is already ready,
the callback runs immediately without $.fn.collapsibleTabs having been
created yet, and so it throws an error.

Fixed by including the .js files in the proper order.

Change-Id: If101efe82970bda7a39d827ce3c668abad6a5f5e
---
M resources/Resources.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Krinkle: Looks good to me, approved
  Catrope: Verified



diff --git a/resources/Resources.php b/resources/Resources.php
index d6852c3..43116e4 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -100,8 +100,8 @@
        ),
        'skins.vector.js' => array(
                'scripts' => array(
-                       'vector/vector.js',
                        'vector/collapsibleTabs.js',
+                       'vector/vector.js',
                ),
                'position' => 'top',
                'dependencies' => 'jquery.delayedBind',

-- 
To view, visit https://gerrit.wikimedia.org/r/71948
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If101efe82970bda7a39d827ce3c668abad6a5f5e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to