Bug 145213

Summary: javascript window.prompt will not accept empty string
Product: [Applications] konqueror Reporter: NROB <nigel>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: lemma, maksim
Priority: NOR Keywords: triaged
Version: 3.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: testcase

Description NROB 2007-05-09 04:49:01 UTC
Version:           3.5.5 (using KDE 3.5.5, Debian Package 4:3.5.5a.dfsg.1-5 (4.0))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17.11-dvb

The javascript 'window.prompt' dialog will not accept an empty string. Specifically the 'OK' button remains disabled until some non-whitespace character is entered. This causes problems if e.g., the dialog is used to edit some data item, or submit a null password.

As the 'Cancel' button returns null rather than '' it would still be distinguishable from the 'OK' action with an empty string.

By contrast, firefox is happy to return an empty string.
Comment 1 Michael Leupold 2008-10-12 17:33:29 UTC
I can still confirm this bug on trunk r870274.
Comment 2 Michael Leupold 2008-10-12 17:34:38 UTC
Created attachment 27833 [details]
testcase

simple testcase.
Comment 3 Stas Verberkt 2009-02-26 19:58:43 UTC
SVN commit 932486 by sverberkt:

Allow empty text in a JavaScript window.prompt

BUG:145213


 M  +5 -2      kjs_window.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=932486
Comment 4 Maksim Orlovich 2009-03-21 16:20:50 UTC
SVN commit 942334 by orlovich:

Merged revision:r932486 | sverberkt | 2009-02-26 13:58:42 -0500 (Thu, 26 Feb 2009) | 4 lines

Allow empty text in a JavaScript window.prompt

BUG:145213

 M  +5 -2      kjs_window.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=942334