Closed Bug 126512 Opened 24 years ago Closed 23 years ago

Java plugins steal focus

Categories

(Core Graveyard :: Java: OJI, defect, P3)

x86
All
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 183103
mozilla1.1alpha

People

(Reporter: mkaply, Assigned: joshua.xia)

References

()

Details

(Whiteboard: [Focus])

Attachments

(1 file)

Go to above page. Whether you use Java or the NPNUL plugin, although the cursor is blinking on the fifth entry field, typing doesn't work. You have to click there to type. This works fine if the applet tag or plugin tag is not there. It also works fine on 4.x.
Strange. It works every other reload of the page.
Moving document.forms['f'].five.focus() in <body>'s onload handler fixes problem for me: <body onload="document.forms['f'].five.focus();"> I'm just speculating here, but maybe document.forms array is built only after applet being loaded/initialized? So on the first load document.forms just doesn't exists at the time it's referenced from script.
I think this problem is not only with Javascript. We have a page here with a flash animation and an input form (username/password). With the focus on the text field, with the caret blinking, I can only type if the mouse is not over the flash animation. Moving the mouse out of the plugin area makes input work again (I don't even need to click on the text field again).
Moving this out to moz1.1
Priority: -- → P3
Target Milestone: --- → mozilla1.1
removing myself from cc:
The plug-ins triage team (av, beppe, peterl, serge and shrir) have reviewed this issue and have made the following determination: When we accessed the above testcase, the caret displays on initial load then disappears, focus is lost when the page fully loads. This works correctly on macOSX. Tested on winXP using branch bits from 20020709. This works correctly when default plug-in is installed. It looks like the applet is grabbing focus when it renders, assigning to OJI folks to see if they can help shed some light on why this may happen
Assignee: av → joe.chou
Component: Plug-ins → OJI
QA Contact: shrir → pmac
Whiteboard: [Focus]
QA Contact: pmac → petersen
reassign to me
Assignee: joe.chou → joshua.xia
take it and reproduce it
Status: NEW → ASSIGNED
I think the script is run and then the applet is loaded and applet catch the focus from the form
Just add <html><body></body></html> this case will work fine. I think the form element doesn't get focus because the form is not in a document.
Closing
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Do you guys know of any focus related Java plugin fixes that went in with regards to stuff like this? It seems like in older JVMs, Java applets didn't take focus when they finished loading, but now they do.
Sorry, I'm reopening here. Something is broke. Go to: http://www.kaply.com/work/bugzilla/126512 After loading the page with flash, focus is in the last entryfield. After loading the page with Java, focus is NOT in the last entryfield. The Java applet is stealing focus. You can look at the JAR file involved ( http://www.kaply.com/work/bugzilla/126512/export.jar ) which has the .Java file in it and see that there is no focus code at all, so the applet should not steal focus. Java plugins should not take focus automatically when they are loaded on a web page. This is Java 1.4.1 on Windows.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: Plugins interfere with Javascript focus → Java plugins steal focus
*** This bug has been marked as a duplicate of 183103 ***
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: