Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -631,7 +631,7 @@ |
632 | 632 | // Attach the submit |
633 | 633 | $block.find( '.articleFeedbackv5-submit' ) |
634 | 634 | .click( function ( e ) { |
635 | | - console.log( 'got to click event' ); |
| 635 | + //alert( 'got to click event' ); |
636 | 636 | e.preventDefault(); |
637 | 637 | $.articleFeedbackv5.submitForm(); |
638 | 638 | } ); |
— | — | @@ -2028,6 +2028,13 @@ |
2029 | 2029 | * @param state bool true to enable; false to disable |
2030 | 2030 | */ |
2031 | 2031 | $.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 | + |
2032 | 2039 | if ( state ) { |
2033 | 2040 | $.articleFeedbackv5.find( '.articleFeedbackv5-submit' ).button( 'enable' ); |
2034 | 2041 | } else { |