changeset 31:4eae156ca604

remove autoExpandThrottle
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 13 Aug 2022 21:40:40 -0600
parents db061869f28f
children 98f11d0cbbd8
files src/sceditor.js
diffstat 1 files changed, 2 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
diff -r db061869f28f -r 4eae156ca604 src/sceditor.js
--- a/src/sceditor.js	Fri Aug 12 00:54:39 2022 -0600
+++ b/src/sceditor.js	Sat Aug 13 21:40:40 2022 -0600
@@ -4354,13 +4354,6 @@
 		var autoExpandBounds;
 
 		/**
-		 * Timeout for the autoExpand function to throttle calls
-		 *
-		 * @private
-		 */
-		var autoExpandThrottle;
-
-		/**
 		 * Cache of the current toolbar buttons
 		 *
 		 * @type {Object}
@@ -5366,8 +5359,8 @@
 		};
 
 		autoExpand = function () {
-			if (options.autoExpand && !autoExpandThrottle) {
-				autoExpandThrottle = setTimeout(base.expandToContent, 200);
+			if (options.autoExpand) {
+				base.expandToContent();
 			}
 		};
 
@@ -5389,9 +5382,6 @@
 				return;
 			}
 
-			clearTimeout(autoExpandThrottle);
-			autoExpandThrottle = false;
-
 			if (!autoExpandBounds) {
 				var height$1 = options.resizeMinHeight || options.height ||
 					height(original);