Bug Tracker

Modify

Ticket #9719 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

comment:1 Changed 3 years ago by timmywil

  • Owner set to firstrose@…
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to attributes

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 3 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 3 years ago by timmywil

  • Owner changed from firstrose@… to timmywil
  • Status changed from pending to assigned

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

comment:4 Changed 3 years ago by timmywil

  • Priority changed from low to high

comment:5 Changed 3 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:6 Changed 3 years ago by timmywil

comment:7 follow-up: ↓ 8 Changed 3 years ago by rwaldron

  • Status changed from assigned to closed
  • Resolution set to worksforme

This will fix your issue:

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

comment:8 in reply to: ↑ 7 Changed 3 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 3 years ago by timmywil

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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 3 years ago by timmywil

  • Status changed from reopened to assigned

comment:11 Changed 3 years ago by anonymous

FYI: IE 8 has the same problem above.

comment:12 Changed 3 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:13 Changed 3 years ago by jquery@…

comment:14 Changed 3 years ago by timmywil

#9952 is a duplicate of this ticket.

comment:15 Changed 3 years ago by timmywil

#10034 is a duplicate of this ticket.

comment:16 Changed 3 years ago by jquery@…

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

comment:17 Changed 3 years ago by jquery@…

More dupes I believe: #9812, #9927

comment:18 Changed 3 years ago by timmywil

#10046 is a duplicate of this ticket.

comment:19 Changed 3 years ago by dmethvin

#10083 is a duplicate of this ticket.

comment:20 Changed 3 years ago by timmywil

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from 1.next to 1.6.3

comment:21 Changed 3 years ago by dmethvin

#10351 is a duplicate of this ticket.

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.