Opened 6 years ago

Closed 6 years ago

#9437 closed bug (notabug)

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 );
	}

Change History (1)

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

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.

Note: See TracTickets for help on using tickets.