r105370 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105369‎ | r105370 | r105371 >
Date:22:16, 6 December 2011
Author:yonishostak
Status:ok
Tags:
Comment:
AFTv5: Fix the double-click submit bug
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
@@ -631,7 +631,7 @@
632632 // Attach the submit
633633 $block.find( '.articleFeedbackv5-submit' )
634634 .click( function ( e ) {
635 - console.log( 'got to click event' );
 635+ //alert( 'got to click event' );
636636 e.preventDefault();
637637 $.articleFeedbackv5.submitForm();
638638 } );
@@ -2028,6 +2028,13 @@
20292029 * @param state bool true to enable; false to disable
20302030 */
20312031 $.articleFeedbackv5.enableSubmission = function ( state ) {
 2032+ // this is actually required to resolve jQuery behavior of not triggering the
 2033+ // click event when .blur() occurs on the textarea and .click() is supposed to
 2034+ // be triggered on the button.
 2035+ if($.articleFeedbackv5.submissionEnabled == state ) {
 2036+ return;
 2037+ }
 2038+
20322039 if ( state ) {
20332040 $.articleFeedbackv5.find( '.articleFeedbackv5-submit' ).button( 'enable' );
20342041 } else {

Status & tagging log