From c83bb594b1b06511b5f79b52568b3d3c8b03943d Mon Sep 17 00:00:00 2001 From: Ryan Lane Date: Thu, 8 Aug 2013 16:22:42 +0800 Subject: [PATCH] htmlform multiselect chosen: Replace lists Rather than appending a new checkbox list and removing the old one, replace the old list with the new one, to preserve ordering. Change-Id: Idd77455bdbaf423e7a51cf3789460d1980f78922 --- resources/mediawiki/mediawiki.htmlform.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/mediawiki/mediawiki.htmlform.js b/resources/mediawiki/mediawiki.htmlform.js index 8e764e1a2a..de0685988e 100644 --- a/resources/mediawiki/mediawiki.htmlform.js +++ b/resources/mediawiki/mediawiki.htmlform.js @@ -103,8 +103,7 @@ $fieldLabelText.text( $oldContainer.find( '.mw-label label' ).text() ); $fieldLabel.append( $fieldLabelText ); $container.prepend( $fieldLabel ); - $oldContainer.parent().append( $container ); - $oldContainer.remove(); + $oldContainer.replaceWith( $container ); return $container; } -- 2.20.1