Closed Bug 180767 Opened 22 years ago Closed 22 years ago

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

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 178520

People

(Reporter: todd_is_too_cool, Assigned: aaronlev)

References

()

Details

Attachments

(1 file)

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.
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
Attached file 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
I experience this bug also.

Mozilla 1.2.1, Windows 2000, Gecko/20021130.

I will try Chimera / Mozilla for OSX hopefully this evening.
DUP of bug 178520?
*** Bug 184253 has been marked as a duplicate of this bug. ***
wfm using Phoenix 20021207 on Linux, both site and testcase.
I think this might be fixed by my checkin for bug 178520.
*** Bug 187265 has been marked as a duplicate of this bug. ***

*** This bug has been marked as a duplicate of 178520 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
v dup
Status: RESOLVED → VERIFIED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: