Closed Bug 542312 Opened 14 years ago Closed 14 years ago

xbl handler does not work for keyboard events like keypress.

Categories

(Core :: XBL, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: kurtb149, Unassigned)

Details

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.6) Gecko/20100107 Fedora/3.5.6-1.fc12 Firefox/3.5.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6

The xbl handler tag no longer works for keyboard events like keypress in Firefox version 3.6.

Reproducible: Always

Steps to Reproduce:
1. give focus to a widget that has a keypress handler.
2. press keys.
3. see that the handler is never called.
Actual Results:  
The handler is never called for keypress events.

Expected Results:  
The handler gets called.
Also a problem on the Win32 build of Firefox 3.6.
Any chance to get a testcase for this. Probably something which uses the xbl file already attached to this bug.


(Just couldn't immediately find anything focusable in the .xml file.)
Attached file xul file needed to run xbl test (obsolete) —
I attached three files: main.xul, main.css, and xblKeyTest.xml. The files should be placed into a single directory and then the main.xul should be loaded with firefox. If firefox has stdout dumping on, then whenever a click event happens, the string "click worked" will print. A keypress event should cause a dump of "keypress worked" but does not.
I didn't test this, but at a glance neither the element the binding is attached to nor the elements in the binding are focusable, so key events will never fire at them.

It's possible that the <description> elements were focused in earlier builds. That was a bug fixed by 494345.
Attachment #423610 - Attachment is obsolete: true
The test widget isn't focusable. In 3.6, the focus() method has no effect on non-focasable elements.
How does one make a widget focasable?
I added to the binding in main.css

    -moz-user-focus: normal;

and now it works.
Can we add this to the release notes for 3.6?
I added dev-doc-needed to bug 494345.  Not sure what the 3.6 relnote situation is.
Sounds like this is invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: