#4347 closed bug (notabug)
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 (10)
Changed 14 years ago by
Attachment: | isOpenTest.html added |
---|
comment:1 Changed 14 years ago by
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".
comment:2 Changed 14 years ago by
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
comment:3 follow-up: 4 Changed 12 years ago by
No the bug has not been closed still it exists in 1.8.6. Kindly Check and Fix!
comment:4 follow-up: 5 Changed 12 years ago by
Replying to 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.
comment:5 Changed 12 years ago by
Replying to scott.gonzalez:
Replying to 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
comment:6 follow-up: 7 Changed 12 years ago by
Sounds like you're probably calling isOpen() before instantiating the dialog. Please use the forums for help.
comment:7 follow-up: 8 Changed 12 years ago by
Replying to 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.
comment:8 Changed 12 years ago by
Replying to 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.
Test case (HTML)