jenkins-bot has submitted this change and it was merged.

Change subject: inputAutoExpand: Catch miscalculation
......................................................................


inputAutoExpand: Catch miscalculation

(bug 53533)
Catch miscalculation of the ruler width happening in IE < 9.

Change-Id: I6e25d112a2fc4d67bcfa23e6c7df2c93b6238b5f
---
M ValueView/resources/jquery/jquery.inputAutoExpand.js
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ValueView/resources/jquery/jquery.inputAutoExpand.js 
b/ValueView/resources/jquery/jquery.inputAutoExpand.js
index 4aac531..ac9624e 100644
--- a/ValueView/resources/jquery/jquery.inputAutoExpand.js
+++ b/ValueView/resources/jquery/jquery.inputAutoExpand.js
@@ -450,7 +450,13 @@
                                ruler.value = text;
 
                                // Update the width in case the original 
textarea width has changed
-                               ruler.style.width = this.input.width() + 'px';
+                               var width = this.input.width();
+                               // Catch miscalculation (IE < 9):
+                               if( width < 0 ) {
+                                       width = 0;
+                               }
+
+                               ruler.style.width = width + 'px';
 
                                // Needed for IE to reliably return the correct 
scrollHeight
                                ruler.scrollTop = 0;

-- 
To view, visit https://gerrit.wikimedia.org/r/89774
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e25d112a2fc4d67bcfa23e6c7df2c93b6238b5f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <henning.sna...@wikimedia.de>
Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to