[Webkit-unassigned] [Bug 74961] New: JavaScript window.prompt() returns incorrect value when Cancel is pressed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 20 15:02:49 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74961

           Summary: JavaScript window.prompt() returns incorrect value
                    when Cancel is pressed
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: p at ul.sickdimension.com


JavaScript window.prompt() should return null when the user clicks the cancel button. Instead an empty string is returned. This seems to be a newly introduced bug with Safari version 5.1.

Sample:

console.log(null != window.prompt('this is a test'));


Pressing escape / clicking cancel should log false. Hitting enter / clicking OK should log true. Instead, window.prompt() returns true no matter which button is pressed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list