Skip to main content

Search and Top Navigation

#4939 closed bug (notabug)

Opened November 03, 2009 04:29PM UTC

Closed November 06, 2009 12:44AM UTC

Last modified October 11, 2012 09:15PM UTC

Dialog fails to recognize termination of self-closing div tag

Reported by: Flynn Owned by:
Priority: minor Milestone:
Component: ui.dialog Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
Description

If a self-closing div (i.e. "<div />") is used as the target of a dialog, the dialog will ignore the tag's termination (i.e. "/>") and include in the dialog content that follows after.

Here is an example where two click events are assigned to a link because the dialog fails to terminate and re-executes the jquery code:

<a id="linkAlert" href="#">View Alert</a>      
<div id="dialogTest" />

<script language="javascript">    
  $(function(){      
    $('#linkAlert').click(function(){
      alert('test');
    });

    $('#dialogTest').dialog();
  });
</script
Attachments (0)
Change History (2)

Changed November 06, 2009 12:44AM UTC by scottgonzalez comment:1

resolution: → invalid
status: newclosed

Divs cannot be self-closing. This is invalid X/HTML.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:2

milestone: TBD

Milestone TBD deleted