Bug 145213 - javascript window.prompt will not accept empty string
Summary: javascript window.prompt will not accept empty string
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 3.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2007-05-09 04:49 UTC by NROB
Modified: 2009-03-21 16:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
testcase (159 bytes, text/html)
2008-10-12 17:34 UTC, Michael Leupold
Details

Note You need to log in before you can comment on or make changes to this bug.
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