Closed Bug 58361 Opened 24 years ago Closed 18 years ago

body onfocus="textbox.focus()" doesn't shift focus correctly

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Windows 98
defect

Tracking

()

RESOLVED WORKSFORME
mozilla1.0.1

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(2 files)

If the body has onfocus="textbox.focus()", clicking on the body when it doesn't have focus gives the textbox a flashing insertion point, but doesn't shift the keyboard focus to the textbox. Might be a dup of bug 39999.
Attached file testcase (deleted) —
I loaded the doc, then clicked on the whitespace and the text field got focus. it seems to be working.
Status: NEW → ASSIGNED
Summary: body onfocus="textbox.focus()" doesn't shift focus correctly → [WFM]body onfocus="textbox.focus()" doesn't shift focus correctly
I still see the problem on the 12/12 Win98 build. The flashing insertion point shows up in the textbox but I can't type into the textbox.
Yes, I see the problem now, reassigning to editor team
Assignee: rods → beppe
Status: ASSIGNED → NEW
Summary: [WFM]body onfocus="textbox.focus()" doesn't shift focus correctly → body onfocus="textbox.focus()" doesn't shift focus correctly
assigning to anthonyd -- anthony you might want to get mike in on this one
Assignee: beppe → anthonyd
Target Milestone: --- → mozilla0.8
adding saari to the cc list because i think this might be an event bug for him, but i want him tor ead this first and tell me if im wrong or not. anthonyd
Hrm, certainly sounds like my bug.
anthonyd punts, Saari fields the return. anthonyd
Assignee: anthonyd → saari
Blocks: focusblink
Status: NEW → ASSIGNED
Target Milestone: mozilla0.8 → mozilla0.9
Target Milestone: mozilla0.9 → mozilla1.0
QA Contact Update
QA Contact: bsharma → vladimire
*** Bug 90455 has been marked as a duplicate of this bug. ***
BuildID: 20010711-0.9.2 OS: window2000 The testcase provided has the onfocus event for the body element. According to http://www.w3.org/TR/html4/struct/global.html#h-7.5.1 , the body element does not support the onfocus event handler. The original testcase provided does not work as desired (the body has onfocus="textbox.focus()" ). When I replaced the onfocus event by onload event (ie.-body now has onload="textbox.focus()" ), the textbox does get focus and user is able to type in the control. The 2nd testcase provided works as desired. 1. Open the attached testcase 2. start typing actual: you will be able to write in the textbox control without clicking on the button.
Attached file testcase (deleted) —
*** Bug 94367 has been marked as a duplicate of this bug. ***
Target Milestone: mozilla1.0 → mozilla1.0.1
Testcase #1 (which uses "onfocus") WFM with 20040922616 if "Find as you type" is turned on, or if actually focusing on the body by clicking in it. If find is off, the cursor is near/in the text box when it's first loaded but you can't type. However, as mentioned in comment 11, onfocus isn't a valid event for <body>, so I'm not sure if that should be addressed.
Assignee: saari → nobody
Status: ASSIGNED → NEW
QA Contact: vladimire → layout.form-controls
I have reproduced this bug with the onLoad event which IS legitimate from what I can tell - as somebody below says the fact that this is an onFocus issue makes it unworthy of attention. I just loaded the overnight build of Mozilla - 1.8b2 Gecko/2005070205 . The bug appears in my chat script here: http://freehosting.hostrave.com/p/moc/index.php?include_page=moc_talk&entry=1 The onload event is as follows: <BODY onLoad="parent.document.sendreceive.content.value=''; parent.document.sendreceive.content.focus()"> When using the ENTER key to submit the form, the cursor is supposed to focus in the Message field. It seems to focus and even blinks, but the keyboard is not actually focused - does not work. Three interesting issues: 1) if the form is sent with the send/receive button ("submit") - everything refocuses fine; 2) if you turn sounds off, using the radio button under sound on/off - again, works fine. 3) if you wait 20 seconds for the chat window to refresh - i.e. another onload event - the focus in the Message field is again captured at the keyboard Thus, the fact that a sound even plays I have tested it quite a bit in Netscape and IE and the bug does NOT appear in those browsers. For what it's worth, I use quicktime alternative 1.70for sound 1.70 - and the sound events are called with embed: <embed SRC="audio/message-inbound.wav" autostart="true" loop="false" hidden="true"> If you fix this, Firefox fans who use our site can once again fast-chat by using the ENTER key! good luck. thanks.
testcase 1 wfm, testcase 2 works as I expect when reading the source code, its description might be misleading. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070107 Minefield/3.0a2pre
Works for me too, both testcases and also the URL in comment 15 does put focus in the text field near the green Send/Receive button, which seems to be the intent of the <body> onload handler, also after submit w. ENTER. Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9a2pre) Gecko/20070107 SeaMonkey/1.5a -> WORKSFORME
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: testcase
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: