Bug Tracker

Modify

Ticket #6601 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

Running .html() on an input element causing IE to stop executing scripts

Reported by: scottchiefbaker Owned by:
Priority: Milestone: 1.4.3
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocking: Blocked by:

Description

If you try and change the .html() of an input element IE throws an error and stops executing scripts further. Non-IE browsers function normally.

I understand that logically you shouldn't do this, but it's probably best that JQuery not throw an exception.

Attachments

ie-html.zip Download (867 bytes) - added by scottchiefbaker 3 years ago.
Testcase

Change History

Changed 3 years ago by scottchiefbaker

Testcase

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

It's hard enough to do something sensible with valid inputs! That error isn't coming from jQuery, it's from IE. You can get the same result by assigning to the .innerHTML of the input element. Like you say, it's not valid and that alone should be reason not to do it. It's easy to debug, just use the IE8 debugger and it will break on the error. You can use the call stack to look and see what errant code caused the problem.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.