Search and Top Navigation
#4347 closed bug (notabug)
Opened March 16, 2009 04:56PM UTC
Closed March 16, 2009 05:49PM UTC
Last modified October 11, 2012 09:15PM UTC
dialog('isOpen') returns an object instead of boolean
Reported by: | BigBadaboom | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.dialog | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The 'isOpen' method is supposed to return true or false. Instead it returns an object.
To reproduce:
Load the attached HTML test file.
Expected result:
Alert box should read "isOpen=true"
Actual result:
Alert box reads "isOpen=[object Object]"
Attachments (1)
Change History (9)
Changed March 16, 2009 05:11PM UTC by comment:1
Changed March 16, 2009 05:49PM UTC by comment:2
resolution: | → invalid |
---|---|
status: | new → closed |
Docs on site are always targeting to last stable release, you could check old docs on http://docs.jquery.com/UI e.g. http://docs.jquery.com/UI/API/1.5/Dialog
Changed December 09, 2010 11:01AM UTC by comment:3
No the bug has not been closed still it exists in 1.8.6. Kindly Check and Fix!
Changed December 09, 2010 01:05PM UTC by comment:4
Replying to [comment:3 Karthik]:
No the bug has not been closed still it exists in 1.8.6. Kindly Check and Fix!
This is definitely fixed. Please provide an example showing the problem.
Changed December 11, 2010 07:11AM UTC by comment:5
Replying to [comment:4 scott.gonzalez]:
Replying to [comment:3 Karthik]: > No the bug has not been closed still it exists in 1.8.6. Kindly Check and Fix! This is definitely fixed. Please provide an example showing the problem.
The bug is still there here is the criteria where I am facing the problem,
//This is the first function that I am calling to Initialize and load the dialog function openTheModal(){ $("#dialog-modal").dialog({ height: 140, modal: true, open:function(ui,event){ $("#dialog-modal").load("test1.html");//Where dialog-modal is a div and I am successfully loading the html } }); } // This is the second function which I will call to get the status of the dialog and getting the result as object function checkIfDialogOpen(){ alert($("#dialog-modal").dialog("isOpen")); // Here it is returning Object , even I tried assigning that to var and checked results and got the same. }
Please kindly Help and Fix!
Regards,
Karthik
Changed December 11, 2010 04:39PM UTC by comment:6
Sounds like you're probably calling isOpen() before instantiating the dialog. Please use the forums for help.
Changed December 12, 2010 04:49AM UTC by comment:7
Replying to [comment:6 scott.gonzalez]:
Sounds like you're probably calling isOpen() before instantiating the dialog. Please use the forums for help.
No I initiated the dialog in the first function and I have missed out $("#dialog-modal").dialog("open") in the first function.Even after that it is still returning object. If possible provide a best case so that I will try it out.
Changed December 12, 2010 05:00AM UTC by comment:8
Replying to [comment:7 Karthik]:
If possible provide a best case so that I will try it out.
https://github.com/jquery/jquery-ui/blob/master/tests/unit/dialog/dialog_methods.js#L84-98
Seriously, this has been working for a LONG time. Please use the forums, I won't be responding to any more comments on this ticket.
Changed October 11, 2012 09:15PM UTC by comment:9
milestone: | TBD |
---|
Milestone TBD deleted
NVM. I was using an old version of jQuery UI. I see now from the changelog that this feature was added in 1.7.
Perhaps, instead of being closed, this bug could be treated as a request to alter the documentation for isOpen to say: "Added in version 1.7".