WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
25743
Selected text in a searchfield only deletes 1 letter at a time on mybrute.com
https://bugs.webkit.org/show_bug.cgi?id=25743
Summary
Selected text in a searchfield only deletes 1 letter at a time on mybrute.com
jasneet
Reported
2009-05-12 16:56:48 PDT
I Steps: 1. Go to
http://mybrute.com/
2. Write something in the "Already signed up?" field 3. select the text with your mouse, that you just wrote, and press Delete/backspace or write something. II Issue: It only deletes the last letter if you press backspace, and the text isn't selected any more. It doesn't do anything if you press Delete, and the text isn't selected any more. If you type a letter, a number or the spacebar it just stands after the text you did mouseover, and the text isn't selected any more. III Conclusion: code for quick reference : <BODY> <FORM action=/go method=post> Type something into textbox and select all of the text. Now hit backspace key. Only last letter gets deleted everytime you hit backspace insteasd of whole text (in Safari/Chrome) <br/> <INPUT onkeydown=js.App.normalize(this); onkeyup=js.App.normalize(this); name=name> </FORM> </BODY> Issue in function : js.App.normalize = function(i) { i.value = new EReg("[^A-Za-z0-9 #.!*$()_/,+:;\\'<>@\"^&=?[~`%\\]-]","g").split(i.value).join(""); } IV Other Browsers: IE7: ok FF3: ok V Nightly tested: 43092 Bug in Chromium :
http://code.google.com/p/chromium/issues/detail?id=10635
Attachments
reduced testcase
(19.29 KB, application/zip)
2009-05-12 16:57 PDT
,
jasneet
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
jasneet
Comment 1
2009-05-12 16:57:03 PDT
Created
attachment 30254
[details]
reduced testcase
Gavin Barraclough
Comment 2
2011-09-09 22:28:45 PDT
Looking at the source code it's not clear why this would clear the text field, the 'normalize' method seems to sanitize the value. FireFox also does not clear it. I can't see a bug here.
Alexey Proskuryakov
Comment 3
2011-09-09 23:46:41 PDT
The bug still exists on this page in Safari 5.1, while Firefox works correctly. Could be a real bug, or just the site sending broken JavaScript to Safari. It certainly sends different content to different browsers, but I couldn't quickly determine if that's the cause, because Firefox version is hugely broken in Safari, and may not even execute the problematic scripts.
Gavin Barraclough
Comment 4
2011-09-10 01:17:57 PDT
Sorry, I missed a step in my testing. I wasn't highlighting the text, thought the deleting-all-text was an expected behavior of the onkeydown handler. My bad.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug