r106175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106174‎ | r106175 | r106176 >
Date:11:53, 14 December 2011
Author:santhosh
Status:ok
Tags:
Comment:
Fixes: IE 6,7 does not allow name change of input:radio after it is created.
jquery delegate change will not work in IE7, IE6, but click works.
Modified paths:
  • /trunk/extensions/WebFonts/resources/ext.webfonts.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/resources/ext.webfonts.js
@@ -274,12 +274,11 @@
275275 var haveSchemes = false;
276276 // Build font dropdown
277277 var $fontsMenu = $( '<ul>' ).attr( 'id', 'webfonts-fontsmenu' );
278 - $fontsMenu.delegate( 'input:radio', 'change', function( e ) {
 278+ $fontsMenu.delegate( 'input:radio', 'click', function( ) {
279279 mw.webfonts.set( $(this).val() );
280280 } );
281281 for ( var scheme in config ) {
282 - var $fontLink = $( '<input type="radio" />' )
283 - .attr( 'name', 'font' )
 282+ var $fontLink = $( '<input type="radio" name="font" />' )
284283 .attr( 'id', fontID( config[scheme] ) )
285284 .val( config[scheme] );
286285
@@ -304,8 +303,7 @@
305304 return null;
306305 }
307306
308 - var $resetLink = $( '<input type="radio" />' )
309 - .attr( 'name', 'font' )
 307+ var $resetLink = $( '<input type="radio" name="font"/>' )
310308 .attr( 'value', 'webfont-none' )
311309 .attr( 'id', 'webfont-none' )
312310 .click( function( e ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r106204MFT r106172 r106175 r106179 r106191nikerabbit15:24, 14 December 2011

Status & tagging log