WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
8114
select method doesn't highlight text field contents for onclick
https://bugs.webkit.org/show_bug.cgi?id=8114
Summary
select method doesn't highlight text field contents for onclick
Bakafish
Reported
2006-03-31 17:05:51 PST
object.select() should highlight and select the contents of the (text field) object according to the DOM. This doesn't seem to happen, the object gets focus, but the contents are not selected. Example code: <html> <head> <script type="text/javascript"> function selText() { document.getElementById("myText").select() } </script> </head> <body> <form> <input size="40" type="text" id="myText" value="A cat played with a ball in the garden"> <input type="button" value="Select text" onclick="selText()"> </form> </body> </html>
Attachments
Test from Comment #0
(331 bytes, text/html)
2006-04-01 15:51 PST
,
David Kilzer (:ddkilzer)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2006-04-01 15:51:03 PST
Created
attachment 7450
[details]
Test from
Comment #0
David Kilzer (:ddkilzer)
Comment 2
2006-04-01 15:52:13 PST
Confirmed on Safari 2.0.3 (417.9.2) on Mac OS X 10.4.5 (8H14).
David Kilzer (:ddkilzer)
Comment 3
2006-04-01 15:54:01 PST
However, this bug has been fixed on ToT as of (at least)
r13607
(built locally). Therefore, closing as RESOLVED/FIXED.
Bakafish
Comment 4
2006-04-03 12:50:19 PDT
Okay, one behavior is fixed, however it still fails in another example. If the textfield element is clicked to obtain focus or the event is set on the onClick (or indirectly the onFocus fired by a click derived focus event) handler the text is selected then the cursor steals the select behavior and the text is no longer selected. Example code 2: <html> <head> <script type="text/javascript"> function selText() { document.getElementById("myText").select() } </script> </head> <body> <form> <input size="40" type="text" id="myText" value="A cat played with a ball in the garden" onclick="selText()"> </form> </body> </html>
Mark
Comment 5
2007-05-18 10:27:18 PDT
I've looked for an appropriate place to put this, and not sure if it merits a separate thread so I'll start here as they may be related: sometimes, when I open a new Firefox window after using it for a while (still w/ tons of free real memory and now pageouts on a 2 GB RAM machine) I am unable to hit the TAB key to select and enter text into the Search Engine entry area. There is a greyed-out indicator of the Search Engine default in the area that is supposed to dissapear when the cursor gets there. Instead the word "Google" in this case remains and the subsequent typing/text entry ends up being appended to the word Google, then you can't enter. Trying Cmd-A for "select all" in os x, or trying deleting all the text doesn't work either....after entering the text the Enter key is still not functional. Closing the window and opening another doesn't usually help...when it gets to this state you need to quit and restart... I've reached this problem several times, but it is infrequent and not easy to test for someone of my skill level/background.
David Kilzer (:ddkilzer)
Comment 6
2007-05-18 23:17:30 PDT
(In reply to
comment #5
)
> I've looked for an appropriate place to put this, and not sure if it merits a > separate thread so I'll start here as they may be related: > > sometimes, when I open a new Firefox window after using it for a while (still > w/ tons of free real memory and now pageouts on a 2 GB RAM machine) I am unable > to hit the TAB key to select and enter text into the Search Engine entry area.
Mark, if this is really a Firefox bug, you want to use:
http://bugzilla.mozilla.org/
I suggest using this page to create a new bug (after you create an account):
https://bugzilla.mozilla.org/enter_bug.cgi
Please note that
http://bugs.webkit.org/
is for Apple's Safari web browser. Thanks!
David Kilzer (:ddkilzer)
Comment 7
2007-05-18 23:18:08 PDT
Mark, please see
Comment #6
.
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