Closed Bug 1197709 Opened 9 years ago Closed 7 years ago

MouseEvent's key-modifier flags are always false in Java applets on Mac

Categories

(Core Graveyard :: Plug-ins, defect)

40 Branch
Unspecified
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: t101sato, Unassigned)

Details

(Keywords: testcase)

A Java applet in a web page can receive mouse-dragg events by implementing java.awt.event.MouseMotionListener interface. Mouse events have flags for key-modifiers (e.g. whether or not the Shift key is down); however, those flags are always false in recent versions of Firefox on Mac. Firefox on Windows and Linux do not have the issue. Other browsers such as Safari and Opera on Mac do not have the issue.

Environments:
 OS: Mac OS 10.10.3, 10.10.4
 Browser: Firefox 39.0.3, 40.0
 JRE: 1.8.0_45, 1.8.0_51, 1.8.0_60

Steps to reproduce:

1. Install Java Runtime Environment from http://java.com/download/

2. Visit my sample page http://ef-site.hgc.jp/jV-test/sample_applet.html

3. Mouse-dragg within applet area with or without the Shift key pressed. The applet shows whether the Shift key is pressed or not.

Here, the sample applet is implemented as below.

------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class SampleApplet extends JApplet implements MouseMotionListener {

    private JTextArea textArea = new JTextArea();

    public void init() {
        super.init();
        getContentPane().setLayout(new BorderLayout());
        getContentPane().add(textArea, BorderLayout.CENTER);
        textArea.addMouseMotionListener(this);
        textArea.append("mouse dragg here\n");
    }

    public void mouseDragged(MouseEvent e) {
        textArea.append("mouse dragged: shiftDown=" + e.isShiftDown() + "\n");
    }

    public void mouseMoved(MouseEvent e) {
    }
}
------------------------------------------------------------
Hiroyuki, do you know if this is a regression in some recent version of Firefox, or has always existed?

This bug is unlikely to be a priority for Mozilla. NPAPI is a legacy technology and we encourage sites to move away from NPAPI plugins such as Java. If you are interested in debugging this, I can find somebody to help show you where to add logging/debugging breakpoints.
Flags: needinfo?(t101sato)
Keywords: testcase
I tried some old versions and found that version 36.0.4 or earlier do not have the issue. The problem first occurs at 37.0b1. I am using ja-JP-mac packages.
Thanks.
Flags: needinfo?(t101sato)
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: UNCONFIRMED → 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.