Bug Tracker

Modify

Ticket #5544 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

Setting type attribute on button tag fails without exception in IE

Reported by: Ceriak Owned by:
Priority: major Milestone: 1.4
Component: attributes Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

var button = $(document.createElement('button')); button.attr('type', 'submit');

Setting the type attribute on an input element throws an error, because IE is unable to carry it out, however doing so on a button element just silently fails, since attr() only checks for not being called on an input.

Change History

comment:1 Changed 3 years ago by dmethvin

  • Component changed from unfiled to attributes

comment:2 Changed 3 years ago by dmethvin

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

This is fixed in 1.4, it throws an error for both button and input.

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.