Henning Snater has submitted this change and it was merged. Change subject: Allow calling already initialized inputAutoExpand() without options ......................................................................
Allow calling already initialized inputAutoExpand() without options Change-Id: Id673dfcd82a26ef319b3f971e715604e4decaaa6 --- M lib/resources/jquery/jquery.inputAutoExpand.js 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Henning Snater: Verified; Looks good to me, approved diff --git a/lib/resources/jquery/jquery.inputAutoExpand.js b/lib/resources/jquery/jquery.inputAutoExpand.js index 7556915..ab29af5 100644 --- a/lib/resources/jquery/jquery.inputAutoExpand.js +++ b/lib/resources/jquery/jquery.inputAutoExpand.js @@ -117,7 +117,12 @@ if( inputAE ) { // AutoExpand initialized already, update options only (will also expand) - inputAE.setOptions( options ); // trigger re-calculation of width + if( options ) { + inputAE.setOptions( options ); // also triggers re-calculation of width + } else { + inputAE.expand(); + } + } else { // initialize new auto expand: var autoExpandInput = new AutoExpandInput( this, fullOptions ); -- To view, visit https://gerrit.wikimedia.org/r/49996 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id673dfcd82a26ef319b3f971e715604e4decaaa6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Werner <daniel.wer...@wikimedia.de> Gerrit-Reviewer: Henning Snater <henning.sna...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits