Henning Snater has uploaded a new change for review.
https://gerrit.wikimedia.org/r/89774
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues
refs/changes/74/89774/1
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: newchange
Gerrit-Change-Id: I6e25d112a2fc4d67bcfa23e6c7df2c93b6238b5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits