Closed
Bug 14311
Opened 25 years ago
Closed 24 years ago
window.confirm() doesn't work
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
People
(Reporter: davidm, Assigned: vidur)
Details
The nsIPrompt interface is being gotten in a different manner than alert and
prompt. Here is my diff for fixing the problem
Index: nsGlobalWindow.cpp
===================================================================
RCS file: /cvsroot/mozilla/dom/src/base/nsGlobalWindow.cpp,v
retrieving revision 1.146
diff -r1.146 nsGlobalWindow.cpp
1170,1175c1170,1180
< nsIPrompt *prompter;
< ret = rootWebShell->QueryInterface(NS_GET_IID(nsIPrompt), (void**)&
prompter);
< if (NS_SUCCEEDED(ret)) {
< ret = prompter->Confirm(str.GetUnicode(), aReturn);
< NS_RELEASE(prompter);
< }
---
> nsIWebShellContainer *rootContainer;
> ret = rootWebShell->GetContainer(rootContainer);
> if (nsnull != rootContainer) {
> nsIPrompt *prompter;
> ret = rootContainer->QueryInterface(NS_GET_IID(nsIPrompt), (void**)&prompter);
> if (NS_SUCCEEDED(ret)) {
> ret = prompter->Confirm(str.GetUnicode(), aReturn);
> NS_RELEASE(prompter);
> }
> NS_RELEASE( rootContainer );
> }
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•25 years ago
|
||
Thanks, Dave. Patch checked in on 9/20/1999.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
still doesnt work correctly: Tried this in build 2000062220 on Winnt 4 <script> if (confirm('Press cancel to stop')){ alert('you shouldnt see this if you pressed cancel'); } </script>
infact, the script does not halt and wait for the return value of confirm. it just continues on its merry way.
Assignee | ||
Comment 4•24 years ago
|
||
There was a temporary regression where alert/confirm dialogs were not modal. I believe this problem has been fixed.
Status: REOPENED → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•