Ticket #6668 (assigned enhancement)

Opened 2 weeks ago

Last modified 4 days ago

destroy() option to not remove dom node

Reported by: bill Owned by: dante
Priority: normal Milestone: 1.2
Component: Dijit Version: 1.1.0
Severity: normal Keywords:
Cc:

Description

Keep Widget.destroy() working the same as today, where it destroys _Widget.domNode, but add parameter to destroy() such that _Widget.destroy(true) does:

  • for behavioral widgets it leaves the original dom node in place, just removing the behavior
  • eventually (not for milestone 1.2) for templated widgets, it will revert the widget to it's original source dom node. In the case of form widgets, the original dom node is an <input>, and the form widget's value should be written to that input, so that form submit works as if the widget still existed. This will hopefully make the back/forward button not erase or "misalign" the values the user previously input into the form. (Have to be a bit careful w/this one though because currently for performance reasons we destroy the original dom node)

This requires removing the finalize parameter from destroy(), but it's unused anyway so that shouldn't be an issue.

Attachments

_Widget.patch (2.2 kB) - added by dante 2 weeks ago.
testFisheye.html (3.4 kB) - added by dante 2 weeks ago.
example destroy() / re-init
destroy.patch (6.7 kB) - added by dante 2 weeks ago.
updated patch / docs / testcase. could be unit test, etc.

Change History

Changed 2 weeks ago by dante

  • status changed from new to assigned

Changed 2 weeks ago by dante

originates at #5684

Changed 2 weeks ago by dante

Changed 2 weeks ago by dante

example destroy() / re-init

Changed 2 weeks ago by dante

updated patch / docs / testcase. could be unit test, etc.

Changed 5 days ago by dante

(In [13684]) refs #6668 - shows how a fisheyelite can be destroy(true)'d and be re-applied with no leaking.

Changed 4 days ago by dante

(In [13692]) refs #6668 - I missed themeTester. how could I?

Changed 4 days ago by dante

(In [13693]) refs #6668 - also touch the quirksmode themetester, again missed by mistake.

Note: See TracTickets for help on using tickets.