New issue
Advanced search Search tips

Issue 873419 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 14
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

hterm: Some 'PASS' bindings don't work in Firefox

Project Member Reported by adrianpo@google.com, Aug 11

Issue description

The following code:

bindings.addBinding('TAB', hterm.Keyboard.KeyActions.PASS);

will work correctly in Chrome but not in Firefox. This is because Firefox seems to trigger both a Keydown and Keypress event while Chrome only fires a Keydown event.

It is not possible to reenable tab-based navigation in Firefox.

Other quirks can be seen as well with bindings such as:
bindings.addBinding('TAB', hterm.Keyboard.KeyActions.PASS);
Expected: Mute tab (pass command to Firefox)
Actual result: Type m in the terminal.

What is the expected result?
- Tab key is sent to the browser and the next element gains focus.

What happens instead?
- Nothing, as the event is stopped in the keypress handler.

This should be relatively easy to fix, simply filtering out the extra Firefox events in the keypress handler.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 14

The following revision refers to this bug:
  https://chromium.googlesource.com/apps/libapps/+/d76f2f00e36862d82f651faf7f7f2a87f8a34368

commit d76f2f00e36862d82f651faf7f7f2a87f8a34368
Author: Adrián Pérez-Orozco <adrianpo@google.com>
Date: Tue Aug 14 20:14:40 2018

hterm: Ignoring Tab keys in onKeyPress_

Tab keys should be either handled by onKeyDown_ or passed to the browser.
This allows users to set a custom PASS binding for the TAB key.

Bug:  873419 
Change-Id: I1739f99db1d40b0750dd269dcc17f3e7a306f045
Reviewed-on: https://chromium-review.googlesource.com/1172941
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Adrián Pérez-Orozco <adrianpo@google.com>

[modify] https://crrev.com/d76f2f00e36862d82f651faf7f7f2a87f8a34368/hterm/js/hterm_keyboard.js

Status: Fixed (was: Unconfirmed)
Summary: hterm: Some 'PASS' bindings don't work in Firefox (was: Some 'PASS' bindings don't work in Firefox)
assuming TAB is the only thing needing extra processing, this is all set now.  thanks for the fix!

Sign in to add a comment