Skip to content

jQuery.removeProp("disabled") does not enable input after disabling with jQuery.prop("disabled", true) #2913

@marques-work

Description

@marques-work

I recently upgraded to 2.2.0 from 1.9.1, and I noticed this change in behavior.

var input = $("<input type='text'/>");
console.log(input.is(":disabled")); // false, as we would expect

input.prop("disabled", true);
console.log(input.is(":disabled")); // true

input.removeProp("disabled");
console.log(input.is(":disabled")); // expected: false, actual: true

// input.prop("disabled", false) or input.removeAttr("disabled") reenable the input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions