Skip to main content

Search and Top Navigation

#9437 closed bug (notabug)

Opened July 18, 2013 10:36AM UTC

Closed July 18, 2013 11:44AM UTC

dialog appendTo option issue

Reported by: mika_kimi Owned by:
Priority: minor Milestone: none
Component: ui.dialog Version: 1.10.3
Keywords: Cc:
Blocked by: Blocking:
Description

The _appendTo function checks the passed option variable instead of the element.

The demo shows that usage of appendTo as

$( ".selector" ).dialog({ appendTo: "#someElem" });

so the function

_appendTo: function() {
		var element = this.options.appendTo;
		if ( element && (element.jquery || element.nodeType) ) {
			return $( element );
		}
		return this.document.find( element || "body" ).eq( 0 );
	}

should be

_appendTo: function() {
                var id = this.options.appendTo;
		var element = $(id);
		if ( element && (element.jquery || element.nodeType) ) {
			return element;
		}
		return this.document.find( element || "body" ).eq( 0 );
	}
Attachments (0)
Change History (1)

Changed July 18, 2013 11:44AM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

No, it shouldn't. You should read the documentation again and see that there's more than one type of value that can be provided. In the future, please don't file bug reports for things that you *think* are problems. If you actually experience a bug, and can prove it, then you should file a bug.