ultimatedelman/autogrow

jQuery 3 compatibility - error in the resize function

gunjangupta opened this issue · 2 comments

We recently upgraded to jQuery 3.1.0
Now we are getting the following error when we backspace in a textbox, which is strange because we are using autogrow on textareas only.

Unable to get property 'ownerDocument' of undefined or null reference

The error happens on
clone = box.clone() //add clone class for extra css rules .addClass(opts.cloneClass) //make "invisible", remove height restriction potentially imposed by existing CSS .css({ position: 'absolute', zIndex: -10, height: '' }) //populate with content for consistent measuring .val(box.val());

My guess would be to check your code. I don't think there's any attempt to
access ownerDocument anywhere within autogrow.

On Wed, Sep 21, 2016 at 8:21 AM, Gunjan Gupta notifications@github.com
wrote:

We recently upgraded to jQuery 3.1.0
Now we are getting the following error when we backspace in a textbox,
which is strange because we are using autogrow on textareas only.

Unable to get property 'ownerDocument' of undefined or null reference

The error happens on
clone = box.clone()
//add clone class for extra css rules
.addClass(opts.cloneClass)
//make "invisible", remove height restriction potentially imposed by
existing CSS
.css({ position: 'absolute', zIndex: -10, height: '' })
//populate with content for consistent measuring
.val(box.val());


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#36, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbrGvA8rECOaE-C1L2WXhsr--0XZht9ks5qsUtngaJpZM4KC78a
.

ownerDocument is referenced in the jQuery3 code. So, the box.clone() is resulting in the error in the jQuery code.
We ended up switching to a different plugin because of some other constraints, so I'm closing this issue.