#9719 closed bug (fixed)
removeAttr('disabled') doesn't change input's color on IE6,JQ 1.6.2
Reported by: | Owned by: | Timmy Willison | |
---|---|---|---|
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 12 years ago by
Component: | unfiled → attributes |
---|---|
Owner: | set to firstrose@… |
Priority: | undecided → low |
Status: | new → pending |
comment:2 Changed 12 years ago by
We experience the same problem on IE7. I saved a reduced test case on jsfiddle:
The button is clickable, but visually it remains disabled. On jQuery 1.6.1 it works as expected.
comment:3 Changed 12 years ago by
Owner: | changed from firstrose@… to Timmy Willison |
---|---|
Status: | pending → assigned |
Confirmed, not sure the difference. I'll take a look.
comment:4 Changed 12 years ago by
Priority: | low → high |
---|
comment:5 Changed 12 years ago by
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 follow-up: 8 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
This will fix your issue:
$("#Save").prop("disabled", false);
comment:8 Changed 12 years ago by
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 12 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
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 12 years ago by
Status: | reopened → assigned |
---|
comment:12 Changed 12 years ago by
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:16 Changed 12 years ago by
Sorry to reference the wrong ticket earlier; I meant to reference #9952. Thanks!
comment:20 Changed 12 years ago by
Milestone: | 1.next → 1.6.3 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in this commit: https://github.com/jquery/jquery/commit/d723942b274e3e48dac82ebde11906a4cb349415
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.