Closed Bug 23107 Opened 25 years ago Closed 25 years ago

prompt() does not return exactly null on cancel

Categories

(SeaMonkey :: UI Design, defect, P3)

x86
Windows 95
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 12021

People

(Reporter: bugs, Assigned: don)

Details

clicking cancel on the prompt() dialog should return exactly null (Flanagan, p737). Thus, the following alert box should be displayed only after the user clicks cancel on the dialog due to the identity operator: if( prompt("Foo","") === null ) { alert("Foo is EXACTLY equal to null"); } however this is not the case. not even equality comparison (==) with null seems to work, although the value returned is some kind of value that displays as an empty string.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 12021 ***
verified dup of 12021 "Javascript prompt is returning bogus value"
Status: RESOLVED → VERIFIED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.