Closed Bug 101784 Opened 23 years ago Closed 20 years ago

Keyboard and mouse freezes when the Javascript onFocus event is called for form controls (onfocus + alert)

Categories

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

defect
Not set
critical

Tracking

()

RESOLVED WORKSFORME
mozilla1.2beta

People

(Reporter: madhur, Assigned: saari)

References

Details

(Keywords: testcase)

Attachments

(8 files)

Build ID: 2001-09-26--3-0.9.4 ----- MacOS 9.1

When the JS onFocus event is called upon for the <input type=password> form 
control, the keyboard goes dead and even the mouse stops working on the controls 
- even the browser search input box does not get any focus.

steps to reproduce:-

1. open the attached testcase
2. click on the form control

actual: 
the onFocus event is called twice - you will see the alert box displayed twice.
Then the keyboard goes dead. Try to click with the mouse on the Browser Search 
input box, it does not receive any focus.
If you click on the browser back button, the previous page is displayed - but 
still the keyboard is keydead. And the mouse click stops working for the form 
controls.

This is specific to Mac machine. So far tested on MacOS 9.1 The JSevent is 
working fine on windows.
Attached file testcase
On Linux 7.1 , the onfocus event is going in a loop. Can't tell whether  the 
kayboard goes dead on linux - since the onfocus event is gone in a loop.
Keywords: testcase
Summary: Keyboard and mouse freez when the Javascript onFocus event is called for <input type=password> → Keyboard and mouse freez when the Javascript onFocus event is called for <input type=password>
Another observation on Linux :--

1. click on the form control -- onfocus event is triggered. If u click on 'OK' 
the onfocus event goes in a loop

2. Now, if you click on the browser search input box, and then hit keyboard 
enter - another alert box is displayed saying 'the information you have entered 
...' --- hit keyboard enter again. You will see the onfocus alert box on the 
screen. Using your mouse, click OK. 
tadddaaa..... the alert box goes away -- the event has gone out of the loop. And 
the keyboard is not keydead.

On macOS 9.1 and macOS 10:-

The onFocus event is triggered twice and then the keyboard goes dead for all of 
the following form controls:-

1. input type=button
2. input type=reset
3. input type=checkbox
4. input type=radio
5. input type=select
6. textarea
7. input type=text
8. input type=password

I have seperate testcases for each of the controls calling upon the onFocus JS 
event.

Attached file textcase for <select>
Summary: Keyboard and mouse freez when the Javascript onFocus event is called for <input type=password> → Keyboard and mouse freez when the Javascript onFocus event is called for form controls
nominating for nsbranch
Keywords: nsbranch
Please also note the observation I made on linux 7.1 :-

My previous comments 
========================================
1. click on the form control -- onfocus event is triggered. If u click on 'OK' 
the onfocus event goes in a loop
2. Now, if you click on the browser search input box, and then hit keyboard 
enter - another alert box is displayed saying 'the information you have entered 
...' --- hit keyboard enter again. You will see the onfocus alert box on the 
screen. Using your mouse, click OK. 
tadddaaa..... the alert box goes away -- the event has gone out of the loop. And 
the keyboard is not keydead.
===============================================

I tried to narrow down the problem by 
1. including the controls within a table cell
2. calling a javascript function when the onFocus JS event is called upon
-- and I still get the same behaviour as mentioned above.

build ID: 2001-09-27-04-0.9.4 (branch) 
what are the chances of this making the 0.9.4 branch?
Whiteboard: [ETA ?]
what's the target for this one?
Whiteboard: [ETA ?] → [Need ETA]
Is this a stop ship? This looks pretty serious.
It is a serious bug, but I wouldn't say stop ship. You won't be seeing this in 
the wild because there is no way to interact with the control, even in IE. 
Thanks for the update and quick turn around ... Much appreciated
Saari says, 6.1 shipped with this issue = PDT-.

If anything turns up in QA's (Gearardo), anaylsis, then let's look at this one
again.
Whiteboard: [Need ETA] → [Need ETA] [PDT-]
========== on linux 7.1 ===========
for all the form controls mentioned, if I call an alert box when the onfocus 
event is triggered, I get the following result :-

1. mouse click on the control - the onfocus event triggered goes into a loop
2. tab to the control - onfocus event triggered - hit enter or mouse ckick 'ok' 
-  the keyboard goes dead - event does not go in a loop.

If I do not call an alert box when the the onfocus event is triggered, instead, 
I say assign a value to another form control, i get the following result :-
 
1. everything works fine and as desired
2. I do not get any event loop or a keyboard freeze.

========== on macOS 10; mac OS 9.1 ===========
for all the form controls mentioned, if I call an alert box when the onfocus 
event is triggered, I get the following result :-

1. If I click on the control, the onfocus event is triggered twice and then the 
keyboard goes dead.
2. If I tab to the form control, the onfocus event is triggered, I hit keyboard 
enter - the event was triggered only once  - but I got a keyboard freeze.

If I do not call an alert box when the the onfocus event is triggered, instead, 
I, say, assign a value to another form control, i get the following result :-
 
1. everything works fine and as desired
2. neither the event is not triggered twice nor I get a keyboard freeze.

============== on win2000 ====================
the onfocus event works fine and as desired, whether -
1. I call an alert box 
or
2. assign a value to the same or any other form control.
This platform does not show any problem.


=========== points to consider ==============
1. why do the event handlers behave differently when a new window environment is 
opened (such as - alert box , prompt box, etc.) - cause a keyboard freeze.
2. the difference in behaviour for the event handler can only be seen on Linux 
7.1, macOS 10 and macOS 9.1

Target Milestone: --- → mozilla0.9.6
Blocks: 107065
Keywords: nsbranch
Too late for 0.9.6, this needs retargeting.
0.9.6 has passed, moving to 0.9.7.  Load balancing 0.9.7 list shortly
Target Milestone: mozilla0.9.6 → mozilla0.9.7
still able to reproduce on 
2001-11-26-17-6.2.1 linux 7.1 -- same behaviour on this platform as described in 
my previous comments.

2001-11-26-17-6.2.1 macOS 10 -- same behaviour on this platform as described in 
my previous comments.

Please provide the target milestone for this. Thanks!
Target Milestone: mozilla0.9.7 → mozilla0.9.6
(correcting for joki.  madhur's last change overwrote joki's.)
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Moving bugs from 0.9.7 for triaging in 0.9.8
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Mass change of nsbranch bugs to nsbeta1. nsbranch is no longer a valid keyword.
Keywords: nsbeta1
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Whiteboard: [Need ETA] [PDT-]
what are ethe chances of getting this one in for 099?
nsbeta1- per ADT triage team
Keywords: nsbeta1nsbeta1-
Target Milestone: mozilla0.9.9 → mozilla1.1
QA Contact: madhur → rakeshmishra
I seem to be having the same problem on my Debian Linux system (2.4.18 
kernel).  Mozilla 0.9.9 (20020412).  The page I am viewing seems to use the 
java events onMouseOver and onMouseOut.  This is a serious problem.  It makes 
some web pages completely unuseable.  I have to completely restart mozilla to 
get my keyboard back.
nominating for nsbeta1
Keywords: nsbeta1-nsbeta1
This bug makes mindterm's java ssh client unusable.
*** Bug 134321 has been marked as a duplicate of this bug. ***
prob happens to Linux (per comment), Mac, and Windows (per dupe)
move target milestone to moz 1.2b as moz 1.1a deadline is missed.

This bug is worksforme on moz 2002102208 win 98. Can anyone still
reproduce this bug?
OS: Mac System 9.x → All
Hardware: Macintosh → All
Summary: Keyboard and mouse freez when the Javascript onFocus event is called for form controls → Keyboard and mouse freezes when the Javascript onFocus event is called for form controls (onfocus + alert)
Target Milestone: mozilla1.1alpha → mozilla1.2beta
QA Contact: rakeshmishra → trix
adt: nsbeta1-
Keywords: nsbeta1nsbeta1-
.
Assignee: joki → saari
QA Contact: trix → ian
What is the status of this bug? I have been suffering similar symptoms since mozilla 1.4 
for linux. The symtoms I suffer are that mozilla no longer acts on keyboard events or 
mouse focus events. The only way I can getout of this mode is to open mozilla mail and 
shift focus to the "subject or sender contains" search field. This appears to be the only 
mouse focus event that works and the only way to get mozilla to operate normally again. 
 
The testcase on this bug causes my mozilla (currently 1.5 released for linux) to display an 
alert box which when closed re-opens hence making mozilla useless (must be killed) 
This bug seems to have disappeared in Mozilla 1.6 (linux).
can anyone else confirm that this problem is gone?
Marking WORKSFORME, please reopen if this reappears.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Component: Event Handling → 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: