Java applets don't get key release events from browser

RESOLVED WONTFIX

Status

()

Core
Plug-ins
P3
normal
RESOLVED WONTFIX
5 years ago
5 months ago

People

(Reporter: grosskopf, Unassigned)

Tracking

({regression, testcase})

2.0 Branch
x86_64
Mac OS X
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

3.18 KB, application/octet-stream
Details
(Reporter)

Description

5 years ago
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.

Updated

5 years ago
Component: General → Plug-ins
Product: Firefox → Core

Comment 1

5 years ago
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
(Reporter)

Comment 2

5 years ago
Created attachment 722785 [details]
Test case applet

Open KeyReleaseTest.html in Firefox.
Flags: needinfo?
(Reporter)

Comment 3

5 years ago
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());
	}
}

Comment 4

5 years ago
Thank you!
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

5 years ago
Keywords: testcase-wanted → testcase
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.
(Reporter)

Comment 6

5 years ago
This bug appears in older versions, too. Probably since Firefox 13:

http://support.mozilla.org/de/questions/944755

Comment 7

5 years ago
Can you run https://github.com/mozilla/mozregression to find a regression range?
Flags: needinfo?(grosskopf)
Keywords: regressionwindow-wanted

Comment 8

5 years ago
So far we don't know that it ever worked.
(Reporter)

Comment 9

5 years ago
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)

Comment 10

5 years ago
The regression range is http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=efbf1fa4c70e&tochange=8d52e3b68ca6
I suspect bug 583499.
Keywords: regressionwindow-wanted → regression
Version: unspecified → 2.0 Branch

Comment 11

5 years ago
That's a bit surprising, but I don't see anything else in the range.
(Reporter)

Comment 12

5 years ago
I have an additional information:
The bug only appears with Java 7.
(Reporter)

Comment 13

4 years ago
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
Last Resolved: 5 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.