Open Bug 314870 Opened 19 years ago Updated 2 years ago

possibly incorrect value of ctrlKey of a keydown event when pressing control key

Categories

(Core :: DOM: Events, defect, P5)

1.8 Branch
PowerPC
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: zzhumphreyt, Unassigned)

Details

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1

Normally pressing a key and releasing it eventually triggers an OnKeyUp event to be called, but this doesn't happen with the control key on the Linux version of Firefox.  I'm the developer of the LastTab tabbed browser extension and this behavior prevents it from working correctly on Linux.  For reference LastTab can be downloaded from here: http://timothyhumphrey.name/firefox/

Reproducible: Always

Steps to Reproduce:
Attached file Testcase (obsolete) —
I don't see any status bar updates in 1.0.7 with the testcase.

Also what version of Firefox is this bug for?

~Anders
I'm actually not sure which version of Firefox this bug affects.  I don't have access to a Linux machine so I can't test this out myself; I'm filing this bug on behalf of a user.  I'll ask him which version of Firefox he's using, or maybe he's reading this and will leave a comment.

About the status bar updates, did you disable JavaScript code being able to do this?  In the Options -> Web Features -> Advanced button next to Enable JavaScript -> Change status bar text.
small testcase to test the keyup event: just press any key with focus on the body and the counter in the input field is incremented by the keyUp event.

WFM with both control keys: 
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051102 Firefox/1.6a1
I just got a reply, this is the version of Firefox he's using:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Firefox/1.0.7 (Ubuntu package 1.0.7)
Confirming: event visualizer testcase does NOT work with:
Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.12) Gecko/20051010 Firefox/1.0.7 (Ubuntu package 1.0.7)
and does NOT work with: (official mozilla.org 1.0.7 download)
Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.12) Gecko/20050920 Firefox/1.0.7

not ubuntu related => 1.0.7 does not work under debian, too.

but WFM with (latest nightly build):
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051104 Firefox/1.6a1

also work with Firefox 1.5rc1:
Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8) Gecko/20051025 Firefox/1.5

This seems to be fixed (at least not appear) in later (than 1.0.7) firefox-releases.

Updating to firefox 1.5rc1 should help.
Hi,

I'm the user who experienced the problem with the LastTab extension. I tried Firefox 1.5 and it does register the keyup event for ctrl. But it isn't flawless yet, because when I release the ctrl key, event.ctrlKey is not set to true.

David
This is test case written by David de Kloet showing the key code of the key pressed as well as the status of the modifier keys.
Attachment #201715 - Attachment is obsolete: true
According to David, in his test case on Linux, Firefox 1.5, when the control key is released the key code for the control key is right and a keyup event is triggered; however, the ctrlKey property of the event object is set to true rather than the expected false.
Actually I said it wrong, the problem is with the keyDown event. The keyUp event is ok when I use Firefox 1.5 but when I press the ctrl key event.ctrlKey == false for the keyDown event. For the keyUp event, when I release ctrl, it's true (as expected?).

David
I just want to add that this bug affects MacOS X as well, not just Linux.  As a matter of fact, none of the modifier keys trigger a keyup event when pressed individually.  I used the the third attachment for this bug to test this.  I'm testing with Firefox 1.5, here's the user agent string:

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
OS: Linux → MacOS X
Hardware: PC → Macintosh
Tweaking summary and product.
Assignee: nobody → events
Component: General → DOM: Events
Product: Firefox → Core
QA Contact: general → ian
Summary: OnKeyUp event not called for control key on Linux → possibly incorrect value of ctrlKey of a keydown event when pressing control key
Version: unspecified → 1.8 Branch
This affects LastTab, as Timothy mentioned, but also Tab Mix Plus, which I use.

OS X 10.4.6
Macbook Pro
Firefox 1.5.0.3
Assignee: events → nobody
QA Contact: ian → events
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: