Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8769 closed bug (fixed)

Widget: "ui-state-disabled" blocks destroy to be triggered on remove

Reported by: Mamen Owned by:
Priority: blocker Milestone: 1.9.2
Component: ui.widget Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

This applies to all widgets, self made or bundled in jQuery UI.

Under normal circumstances widgets will be destroyed if the DOM removes or replaces these elements. (For example by $("#someParent").remove() or $("#someParent").html("...new content..."))

However if the widget element has the class "ui-state-disabled", the "destroy" function will not be called. I believe this is a bug in Widget prototype where remove is bound to destroy widgets using _on. _on blocks events if the given class is present.

_on is a nice function, but it should be possible to turn off disabled-check.

Change History (6)

comment:1 Changed 7 years ago by Scott González

Priority: minorblocker
Status: newopen

Related to #8758.

comment:2 Changed 7 years ago by Jörn Zaefferer

Blocking: 8758 added

comment:3 Changed 7 years ago by Scott González

Blocking: 8758 removed
Summary: "ui-state-disabled" blocks destroy to be triggered on removeWidget: "ui-state-disabled" blocks destroy to be triggered on remove

comment:4 Changed 7 years ago by Scott González

Resolution: fixed
Status: openclosed

Widget: Suppress disabled check when binding destroy to the remove event. Fixes #8769 - Widget: ui-state-disabled blocks destroy to be triggered on remove.

Changeset: 1cdeeccab0e76495842cad9d04e686aee802777d

comment:5 Changed 7 years ago by Scott González

Widget: Suppress disabled check when binding destroy to the remove event. Fixes #8769 - Widget: ui-state-disabled blocks destroy to be triggered on remove. (cherry picked from commit 1cdeeccab0e76495842cad9d04e686aee802777d)

Changeset: 0ad6d7a4a9f8a96b478c527f7afc8c33439e0426

comment:6 Changed 7 years ago by Scott González

Milestone: 1.10.01.9.2
Note: See TracTickets for help on using tickets.