Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#4939 closed bug (notabug)

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

Change History (2)

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

Resolution: invalid
Status: newclosed

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

comment:2 Changed 7 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.