Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#11723 closed bug (invalid)

Changing text in textarea inside of focus event crashes IE 7/8

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


After setting a focus event on a textarea element and changing the text of that element, as soon as text is entered from keyboard input, IE 7/8 will crash.

After the focus event is finished running the below code, any additional keyboard input will cause IE to crash. It does not seem to get stuck in any loops...it crashes immediately.


Changing the above code block to this example seems to solve the problem.

   document.form.textarea.value = "";

Change History (4)

comment:1 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed

The equivalent to document.form.textarea.value = ""; is $(this).val(""); because textareas have values, not child text nodes.

comment:2 Changed 11 years ago by anonymous

Is there a reason or explanation as to why it would crash IE, but work in other browsers?

comment:3 Changed 11 years ago by dmethvin

Lots of invalid things don't work consistently across browsers. Use the value property of a textarea.

comment:4 Changed 11 years ago by anonymous

Thanks, this worked as well. However, I logged this issue as a bug because it crashed the browser. I would expect it to fail gracefully.

Note: See TracTickets for help on using tickets.