Closed Bug 849172 Opened 11 years ago Closed 7 years ago

Java applets don't get key release events from browser

Categories

(Core Graveyard :: Plug-ins, defect, P3)

2.0 Branch
x86_64
macOS
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: grosskopf, Unassigned)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

3.18 KB, application/octet-stream
Details
When I run a java applet in Firefox listening for key events, the applet gets KEY_PRESSED and KEY_TYPED events, but doesn't get KEY_RELEASED events.
I tested this with Mac OS X 10.8.2, Java 1.7.0_17 and FireFox 19.0.2.
The same applet gets KEY_RELEASED events when started in Safari (Mac OS) or FireFox (Windows 7).
This bug can be reproduced always.
Component: General → Plug-ins
Product: Firefox → Core
Can you provide a minimal testcase? At this point I don't think this is a priority for my team, so I'd be happy for a volunteer to take this.
Flags: needinfo?
Keywords: testcase-wanted
Priority: -- → P3
Attached file Test case applet
Open KeyReleaseTest.html in Firefox.
Flags: needinfo?
I added a minimal test case applet.
Open KeyReleaseTest.html in Firefox. You should see the applet as a red box (size 320x200 pixels). When you click it with your mouse you will see "Mouse pressed" on the console. Press a key and the output will be "Key pressed ..." and "Key typed ..." but no "Key released ...".
Here is the source code of the applet:

import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JApplet;

public class KeyReleaseTestApplet extends JApplet {
	
	public void init() {
		addMouseListener( new MouseAdapter() {
			public void mousePressed( MouseEvent e) {
				System.out.println( "Mouse pressed.");
				requestFocus();
			}
		});
		addKeyListener( new KeyListener() {
			
			public void keyTyped( KeyEvent e) {
				System.out.println( "Key typed. e="+e);
			}
			
			public void keyReleased( KeyEvent e) {
				System.out.println( "Key released. e="+e);
			}
			
			public void keyPressed( KeyEvent e) {
				System.out.println( "Key pressed. e="+e);
			}
		});
	}
	
	public void paint(Graphics gr) {
		gr.setColor( Color.red);
		gr.fillRect( 0,0,getWidth(), getHeight());
	}
}
Thank you!
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter, does this bug also happen with older versions of Firefox?

And if not, would you be willing to test trunk (aka mozilla-central) nightlies to find out in which this bug started happening?

This is something a volunteer could do.  But knowing the regression range might make a volunteer more likely to be interested in working on this bug.
This bug appears in older versions, too. Probably since Firefox 13:

http://support.mozilla.org/de/questions/944755
Can you run https://github.com/mozilla/mozregression to find a regression range?
Flags: needinfo?(grosskopf)
So far we don't know that it ever worked.
Running the mozregression tool I found that key released events worked until nightly build from 2011-01-20. In 2011-01-21 it is broken.
Flags: needinfo?(grosskopf)
That's a bit surprising, but I don't see anything else in the range.
I have an additional information:
The bug only appears with Java 7.
Since Java 1.7.0_21 it is broken in Safari, too. So maybe this is an Jave/Oracle issue.
I'm marking this bug as WONTFIX per bug #1269807.

For more information see - https://blog.mozilla.org/futurereleases/2015/10/08/npapi-plugins-in-firefox/
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
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: