Search and Top Navigation
#8982 closed bug (wontfix)
Opened January 18, 2013 01:01PM UTC
Closed January 18, 2013 01:06PM UTC
Dialog containment should be reset when using new "appendTo" option
Reported by: | raybellis | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.dialog | Version: | 1.10.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If a dialog is moved outside of its default position to an alternate element using the new "appendTo" option then the dialog's containment should be reset to that new element.
This is similar to #5699, except that now that there's an officially supported method of reparenting a dialog I think the user should expect jQueryUI to "do the right thing" automatically.
My generic code to reparent a dialog now looks like this:
var $this = $(this); var o = $this.dialog('option'); if (!o.modal) { $this.dialog('option', 'appendTo', $wm); var $p = $this.parent(); if (o.draggable) { $p.draggable('option', 'containment', 'parent') } if (o.resizable) { $p.resizable('option', 'containment', 'parent'); } }
which is IMHO needlessly complicated (and requires knowledge of jQueryUI internals that most developers don't need) when this logic should be inside the plugin.
Attachments (0)
Change History (1)
Changed January 18, 2013 01:06PM UTC by comment:1
resolution: | → wontfix |
---|---|
status: | new → closed |
No, that's custom behavior. People generally need the
appendTo
option to preserve context for things like forms. You're actually not using any internals in that code, only public APIs.