From 5e5207fdbfc79964185dda78d2f950f86b6a4470 Mon Sep 17 00:00:00 2001 From: Kristoffer Dahl Hansen Date: Sat, 7 Nov 2015 14:10:04 +0100 Subject: [PATCH] Fixed memory leak --- src/autosize.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/autosize.js b/src/autosize.js index b42cfa7..0904b8e 100644 --- a/src/autosize.js +++ b/src/autosize.js @@ -41,7 +41,7 @@ function assign(ta, {setOverflowX = true, setOverflowY = true} = {}) { if (isNaN(heightOffset)) { heightOffset = 0; } - + update(); } @@ -128,6 +128,7 @@ function assign(ta, {setOverflowX = true, setOverflowY = true} = {}) { ta.removeEventListener('input', update); ta.removeEventListener('keyup', update); ta.removeEventListener('autosize:destroy', destroy); + ta.removeEventListener('autosize:update', update); set.delete(ta); Object.keys(style).forEach(key => {