diff --git a/autosize.jquery.json b/autosize.jquery.json index 42fac50..873a552 100644 --- a/autosize.jquery.json +++ b/autosize.jquery.json @@ -2,7 +2,7 @@ "name": "autosize", "title": "Autosize", "description": "Automatically adjust textarea height based on user input.", - "version": "1.17.6", + "version": "1.17.7", "dependencies": { "jquery": ">=1.7" }, diff --git a/bower.json b/bower.json index 69821a6..22c7b68 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "jquery-autosize", "description": "Automatically adjust textarea height based on user input.", - "version": "1.17.6", + "version": "1.17.7", "dependencies": { "jquery": ">=1.7" }, diff --git a/jquery.autosize.js b/jquery.autosize.js index 126dcb7..381408b 100644 --- a/jquery.autosize.js +++ b/jquery.autosize.js @@ -1,5 +1,5 @@ /*! - Autosize v1.17.6 - 2013-08-27 + Autosize v1.17.7 - 2013-09-03 Automatically adjust textarea height based on user input. (c) 2013 Jack Moore - http://www.jacklmoore.com/autosize license: http://www.opensource.org/licenses/mit-license.php @@ -136,11 +136,11 @@ // Chrome-specific fix: // When the textarea y-overflow is hidden, Chrome doesn't reflow the text to account for the space // made available by removing the scrollbar. This workaround triggers the reflow for Chrome. - if (window.chrome && 'setSelectionRange' in ta) { - var cursorIndex = ta.selectionStart; - ta.value += ' '; - ta.value = ta.value.slice(0,-1); - ta.setSelectionRange(cursorIndex,cursorIndex); + if (window.chrome) { + var width = ta.style.width; + ta.style.width = '0px'; + var ignore = ta.offsetWidth; + ta.style.width = width; } } diff --git a/jquery.autosize.min.js b/jquery.autosize.min.js index a8480bc..fa09b71 100644 --- a/jquery.autosize.min.js +++ b/jquery.autosize.min.js @@ -1,7 +1,7 @@ /*! - Autosize v1.17.6 - 2013-08-27 + Autosize v1.17.7 - 2013-09-03 Automatically adjust textarea height based on user input. (c) 2013 Jack Moore - http://www.jacklmoore.com/autosize license: http://www.opensource.org/licenses/mit-license.php */ -(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(window.jQuery||window.$)})(function(e){var t,o={className:"autosizejs",append:"",callback:!1,resizeDelay:10},i='