Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#5430 closed bug (notabug)

isOpen returns object instead of undefined (as 1.7.2 did) when called on a non dialog object

Reported by: johnwebbcole Owned by:
Priority: major Milestone:
Component: ui.core Version: 1.8
Keywords: Cc:
Blocked by: Blocking:


In 1.7.2 when you called isOpen on an element that had not had a dialog created on it, you would get 'undefined'. Same held true for an element that had the .dialog('destroy') method called on it.

In 1.8, isOpen returns an object under the same situations. This hampers routines checking to see if a dialog is already up (in my case a dialog with a progress bar in it).

Here an example:


<!-- <link href="css/ui-lightness/jquery-ui-1.8.custom.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script> -->
<link href="css/ui-lightness/jquery-ui-1.8.custom.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script>

<script type="text/javascript">
	$(function() {
		$("#Dialog").dialog({title: 'Alert',
                    autoOpen: false,
                    modal: true});

<div id="Dialog">test

1.7.2 returns

undefined false undefined

1.8 returns

object false object

Change History (2)

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

Resolution: invalid
Status: newclosed

Methods are not meant to be used when the plugin isn't initialized.

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

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.