Daniel Werner has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/49996


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/96/49996/1

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: newchange
Gerrit-Change-Id: Id673dfcd82a26ef319b3f971e715604e4decaaa6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner <daniel.wer...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to