Skip to main content

Search and Top Navigation

#10981 closed bug (notabug)

Opened February 05, 2015 07:47AM UTC

Closed February 05, 2015 11:52AM UTC

Error in dialog() when HTML contains comment

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

Following code will display dialog, but error "this.element[0].style is undefined" will occur.

$('<div>test</div><!-- comment -->').dialog();

http://jsfiddle.net/4Lazbxgj/

Attachments (0)
Change History (1)

Changed February 05, 2015 11:52AM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

Because you're creating two elements, a div and a comment, and trying to turn both into dialogs. Obviously you can't turn a comment into a dialog, so this is invalid usage.