Skip to main content

Search and Top Navigation

#6719 closed enhancement (wontfix)

Opened December 04, 2010 03:34PM UTC

Closed December 04, 2010 06:37PM UTC

Autodelete for Dialogs

Reported by: johncrenshaw Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.6
Keywords: Cc:
Blocked by: Blocking:
Description

Dialogs are likely to be created dynamically and forgotten about. We have an AJAX system that can create them as part of a response. Right now, deleting dynamic dialogs requires an explicitly crafted function to be added with every dialog. I propose adding an "autoDelete" option:

$("<div>some content</div>").dialog({autoDelete: true;});

This would cause the new elements to be removed from the DOM automatically when the dialog is closed. (Important to prevent leaks, and also to prevent ID collisions if the dialog is re-added later.)

technically backwards compatibility would require autoDelete to always default to false, however, I wonder if it makes sense to default to true iff the dialog was a fragment?

Attachments (0)
Change History (1)

Changed December 04, 2010 06:37PM UTC by scottgonzalez comment:1

resolution: → wontfix
status: newclosed

You can build this as an extension.