Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#9719 closed bug (fixed)

removeAttr('disabled') doesn't change input's color on IE6,JQ 1.6.2

Reported by: firstrose@… Owned by: timmywil
Priority: high Milestone: 1.6.3
Component: attributes Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:

Description

Using following code on IE6:

    <input id="FSC_btnSave" type="button" value="Save" onclick="alert('clickable');"
        disabled="disabled" />
    <input id="FSC_btnClose" type="button" onclick="Test();" value="Close" />

        function Test()
        {
            $('#FSC_btnSave').removeAttr('disabled');
            //$('#FSC_btnSave').attr('disabled',false);
        }

JQ1.6.2 only makes the button clickable, looking still gray.

But 1.6.1 works fine.

Change History (21)

comment:1 Changed 10 years ago by timmywil

Component: unfiledattributes
Owner: set to firstrose@…
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsfiddle.net that reproduces the issue experienced to help us assess your ticket.

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 Changed 10 years ago by anonymous

We experience the same problem on IE7. I saved a reduced test case on jsfiddle:

http://jsfiddle.net/rpXwF/

The button is clickable, but visually it remains disabled. On jQuery 1.6.1 it works as expected.

comment:3 Changed 10 years ago by timmywil

Owner: changed from firstrose@… to timmywil
Status: pendingassigned

Confirmed, not sure the difference. I'll take a look.

comment:4 Changed 10 years ago by timmywil

Priority: lowhigh

comment:5 Changed 10 years ago by timmywil

I have no idea how, but this commit changed the behavior cf702496ee28830f3488ed3f1c3940cfbb2dfa8f

Either way, the hook is set so I don't see how this could change anything except some kind of accessing magic that cause IE to repaint.

comment:7 Changed 10 years ago by Rick Waldron

Resolution: worksforme
Status: assignedclosed

This will fix your issue:

$("#Save").prop("disabled", false);

comment:8 in reply to:  7 Changed 10 years ago by anonymous

Does this mean that the issue with removeAttr("disabled") will not be fixed for 1.6.3? In fact, you can see the problem when using IE to view the removeAttr() documentation example.

Replying to rwaldron:

This will fix your issue:

$("#Save").prop("disabled", false);

comment:9 Changed 10 years ago by timmywil

Resolution: worksforme
Status: closedreopened

This should probably stay open since we still want to support this in attr/removeAttr, even though prop is the preferred usage. I did narrow it down to the argument check causing a repaint, so that is really weird, but I'll assign this to myself and play with it.

comment:10 Changed 10 years ago by timmywil

Status: reopenedassigned

comment:11 Changed 10 years ago by anonymous

FYI: IE 8 has the same problem above.

comment:12 Changed 10 years ago by anonymous

I've test with: IE 6 SP1, IE 6 SP3, IE 7 IE 8 and IE9. I have the same problem above. I try

.prop("disabled", false);
.prop("readonly", false);

but not work.

comment:14 Changed 10 years ago by timmywil

#9952 is a duplicate of this ticket.

comment:15 Changed 10 years ago by timmywil

#10034 is a duplicate of this ticket.

comment:16 Changed 10 years ago by jquery@…

Sorry to reference the wrong ticket earlier; I meant to reference #9952. Thanks!

comment:17 Changed 10 years ago by jquery@…

More dupes I believe: #9812, #9927

comment:18 Changed 10 years ago by timmywil

#10046 is a duplicate of this ticket.

comment:19 Changed 10 years ago by dmethvin

#10083 is a duplicate of this ticket.

comment:20 Changed 10 years ago by timmywil

Milestone: 1.next1.6.3
Resolution: fixed
Status: assignedclosed

comment:21 Changed 10 years ago by dmethvin

#10351 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.