r112645 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112644‎ | r112645 | r112646 >
Date:21:14, 28 February 2012
Author:foxtrott
Status:fixme (Comments)
Tags:
Comment:
bugfix (submit script not executed in some cases)
Modified paths:
  • /trunk/extensions/SemanticForms/libs/SF_submit.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/libs/SF_submit.js
@@ -2,7 +2,7 @@
33 * Javascript handler for the save-and-continue button
44 */
55
6 -jQuery( function( $ ) {
 6+( function( $ ) {
77
88 var sacButtons;
99 var form;
@@ -165,4 +165,4 @@
166166 return params;
167167 }
168168
169 -})
 169+})(jQuery);

Comments

#Comment by Nikerabbit (talk | contribs)   07:47, 29 February 2012

That looks wrong. You can't manipulate the dom before document.ready.

#Comment by F.trott (talk | contribs)   08:26, 29 February 2012

Should be ok. It is loaded as a RL module. At the time of module loading the dom should be ready (or at least all dom elements should be present).

#Comment by Nikerabbit (talk | contribs)   09:59, 29 February 2012

That's not true. Modules loading before dom ready caused lots of hard to debug javascript issues when 1.19 was deployed to WMF.

#Comment by F.trott (talk | contribs)   18:01, 29 February 2012

So what do you suggest?

Status & tagging log