Bug Tracker

Modify

Ticket #8 (closed bug: fixed)

Opened 7 years ago

Last modified 15 months ago

Disabled attribute of input elements

Reported by: franck.marcia@… Owned by:
Priority: major Milestone: 1.0
Component: core Version: 1.0
Keywords: Cc:
Blocking: Blocked by:

Description (last modified by john) (diff)

When you want to enable a disabled element with $(element).set('disabled', false), it fails.

In $.attr, "o[a] = v" does the job but "o.setAttribute(a,v)" reverts disabled to true.

  • Failure only with FF (works fine with IE) on WinXP.
  • Workaround: use $(element).get(0).disabled = false (or each() if several elements are involved)

Change History

comment:1 Changed 7 years ago by john

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

Thanks for the find, Frack - this has been fixed in SVN rev [81].

comment:2 Changed 7 years ago by john

  • Version set to 1.0
  • Milestone set to 1.0

comment:3 Changed 6 years ago by randomperson

  • Status changed from closed to reopened
  • Resolution fixed deleted

Maybe I misunderstand what was trying to be conveyed, but using his example with the current version of jQuery (1.1.3.1) is still broken with Firefox 2.0.0.4 on XP. So, the first two sets of buttons do not work, while the third set (his workaround) works. Also, you could add the following to his example as workarounds that work:

<input type="button" value="Disable" onclick="$('#x').attr('disabled','disabled')"/>
<input type="button" value="Enable" onclick="$('#x').attr('disabled','')"/>

comment:4 Changed 6 years ago by john

  • need set to Review
  • Status changed from reopened to closed
  • Resolution set to fixed
  • Description modified (diff)

comment:5 Changed 2 years ago by owais.iqbal@…

IE7 gives error when disabling a drop down list. $('select#country').attr('disabled', true); or $('select#country').attr('disabled', 'disabled');

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.