Hi Guys,

In select list component, when we set something in "LOAD A PRE-BUILT OPTION LIST" and after set "None" => Readonly attribute
not removed from textarea.

Comments

samvel’s picture

Assigned: samvel » Unassigned
Status: Active » Needs review
StatusFileSize
new434 bytes

$('#' + result.elementId).attr('readonly', ''); not working

need use $('#' + result.elementId).removeAttr('readonly'); instead

Patch attached

quicksketch’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Thanks, simple patch with no downsides that I can see. I think specifying an empty attribute to remove an attribute was broken in some versions of jQuery, which is probably what you're experiencing. removeAttr() is much more reliable and available in all versions.

quicksketch’s picture

Title: Readonly in selects not removing » Readonly attribute in selects not removing when using predefined select lists
Status: Reviewed & tested by the community » Fixed

Thanks, committed to all branches.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

fenstrat’s picture

Version: 7.x-3.x-dev » 8.x-4.x-dev
Assigned: Unassigned » fenstrat
Status: Closed (fixed) » Patch (to be ported)

Needs porting to 8.x-4.x.

fenstrat’s picture

Version: 8.x-4.x-dev » 7.x-3.x-dev
Assigned: fenstrat » Unassigned
Status: Patch (to be ported) » Fixed

Committed and pushed 45321e2 to 8.x-4.x. Thanks!

  • Commit b1f17f9 on 8.x-4.x authored by Samvel, committed by fenstrat:
    Issue #2109639 by Samvel: Readonly attribute in selects not removing...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.