Javascript highlights characters typed into a form textbox, so that only one can be entered

VERIFIED DUPLICATE of bug 178520

Status

()

VERIFIED DUPLICATE of bug 178520
16 years ago
16 years ago

People

(Reporter: todd_is_too_cool, Assigned: aaronlev)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/4.78 (Macintosh; U; PPC)
Build Identifier: Mozilla 1.2beta, Build ID 2002101612

In the example page, http://www.mobile.att.net/messagecenter/, the Javascript
causes characters that a user types into the "from" box to be selected
(highlighted) immediately after the key is typed.  Because of this, each
character typed replaces whichever one was typed before it, and only one
character can be entered into the box by a human.  The only workaround is to
paste text from the clipboard.

Reproducible: Always

Steps to Reproduce:
1. Go to URL http://www.mobile.att.net/messagecenter/
2. Try to type in the box labeled "from" 

Actual Results:  
Every keypress replaced whatever character was already in the box.

Expected Results:  
The box should accept normal typing while the box is still active with a cursor
in it.  Perhaps the intention is to highlight it when a user first clicks to
place the cursor in the box or upon leaving the box, but it should not happen
while the cursor is still present and active.  In MSIE, the box seems "normal""
it highlights existing text when switching to that form element.

Comment 1

16 years ago
Confirming reported behavior with Mozilla trunk 20021115xx WinNT.
I will attach a reduced testcase below, which consists of this:

    <input type="text" size="25" onKeyUp="this.focus();">

In IE6, we are able to type without any problems into this textbox.
In Moz, if we type slowly, each character overwrites the previous one.
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale

Comment 2

16 years ago
Created attachment 106702 [details]
Reduced testcase
focusing the textbox should highlight all the text.  Over to keyboard nav, where
this decision was made, iirc....  We already have bugs on this happening for
.focus() from JS.
Assignee: jst → aaronl
Component: DOM Level 0 → Keyboard Navigation
QA Contact: desale → sairuh
Whiteboard: DUPEME

Comment 4

16 years ago
I experience this bug also.

Mozilla 1.2.1, Windows 2000, Gecko/20021130.

I will try Chimera / Mozilla for OSX hopefully this evening.
(Assignee)

Comment 5

16 years ago
DUP of bug 178520?

Comment 6

16 years ago
*** Bug 184253 has been marked as a duplicate of this bug. ***

Comment 7

16 years ago
wfm using Phoenix 20021207 on Linux, both site and testcase.
(Assignee)

Comment 8

16 years ago
I think this might be fixed by my checkin for bug 178520.

Comment 9

16 years ago
*** Bug 187265 has been marked as a duplicate of this bug. ***

*** This bug has been marked as a duplicate of 178520 ***
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
v dup
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.