Bug Tracker

Opened 8 years ago

Closed 8 years ago

#10761 closed bug (invalid)

disabling textareas with prop() issue

Reported by: faeb187 Owned by:
Priority: low Milestone: None
Component: attributes Version: 1.7
Keywords: Cc:
Blocked by: Blocking:

Description

first time prop( "disabled", true ) on $( ':input' ) works for textareas.. but after removeProp( "disabled" ) it's not possible to disable textareas again with same function and same selector.

my workaround: I used attr( "disabled", "disabled" ) instead...

Change History (1)

comment:1 Changed 8 years ago by timmywil

Component: unfiledattributes
Priority: undecidedlow
Resolution: invalid
Status: newclosed

As per the docs on prop, never remove native properties. They will be lost forever as you have discovered. Instead, set disabled to false.

$('textarea').prop('disabled', false);
Note: See TracTickets for help on using tickets.