Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -224,6 +224,12 @@ |
225 | 225 | * Bucket 1: Share Your Feedback |
226 | 226 | */ |
227 | 227 | '1': { |
| 228 | + |
| 229 | + /** |
| 230 | + * Currently displayed placeholder text. This is a workaround for Chrome/FF |
| 231 | + * automatic focus in overlays. |
| 232 | + */ |
| 233 | + currentDefaultText: '', |
228 | 234 | |
229 | 235 | // {{{ templates |
230 | 236 | |
— | — | @@ -352,6 +358,7 @@ |
353 | 359 | var def_msg_no = mw.msg( 'articlefeedbackv5-bucket1-question-comment-no' ); |
354 | 360 | if ( $txt.val() == '' || $txt.val() == def_msg_yes || $txt.val() == def_msg_no ) { |
355 | 361 | $txt.val( new_val == 'yes' ? def_msg_yes : def_msg_no ); |
| 362 | + $.articleFeedbackv5.currentBucket().currentDefaultText = $txt.val(); |
356 | 363 | } |
357 | 364 | // enable submission |
358 | 365 | $.articleFeedbackv5.enableSubmission( true ); |
— | — | @@ -360,18 +367,10 @@ |
361 | 368 | // Clear out the question on focus |
362 | 369 | $block.find( '.articleFeedbackv5-comment textarea' ) |
363 | 370 | .focus( function () { |
364 | | - var def_msg = ''; |
365 | | - var val = $.articleFeedbackv5.find( '.articleFeedbackv5-bucket1-toggle input[checked]' ).val(); |
366 | | - if ( val == 'yes' ) { |
367 | | - def_msg = mw.msg( 'articlefeedbackv5-bucket1-question-comment-yes' ); |
368 | | - } else if ( val == 'no' ) { |
369 | | - def_msg = mw.msg( 'articlefeedbackv5-bucket1-question-comment-no' ); |
370 | | - } |
371 | | - if ( $( this ).val() == def_msg ) { |
| 371 | + if ( $( this ).val() == $.articleFeedbackv5.currentBucket().currentDefaultText ) { |
372 | 372 | $( this ).val( '' ); |
373 | | - $(this).addClass( 'active' ); |
| 373 | + $( this ).addClass( 'active' ); |
374 | 374 | } |
375 | | - |
376 | 375 | } ) |
377 | 376 | .keyup ( function () { |
378 | 377 | if( $( this ).val().length > 0 ) { |
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js |
— | — | @@ -128,6 +128,7 @@ |
129 | 129 | $fixedTab.addClass( 'articleFeedbackv5-fixedtab' ); |
130 | 130 | $fixedTab.find( '#articleFeedbackv5-fixedtabbox' ).addClass( 'articleFeedbackv5-fixedtabbox' ); |
131 | 131 | $fixedTab.find( '#articleFeedbackv5-fixedtablink' ).addClass( 'articleFeedbackv5-fixedtablink' ); |
| 132 | + $fixedTab.find( '#articleFeedbackv5-fixedtablink' ).css( 'border', '#00F 1px solid' ); |
132 | 133 | $aftDiv.articleFeedbackv5( 'addToRemovalQueue', $fixedTab ); |
133 | 134 | } |
134 | 135 | |