Some Emacs-like shortcuts not working in location bar on macOS

NEW
Unassigned

Status

()

Firefox
Address Bar
P3
normal
5 months ago
3 months ago

People

(Reporter: Martin Polden, Unassigned)

Tracking

55 Branch
x86_64
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fxsearch])

(Reporter)

Description

5 months ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170803105720

Steps to reproduce:

I type some letters in the location bar and a list of suggestions appears. I then press Ctrl+N or Ctrl+P to navigate to next or previous suggestion.


Actual results:

Ctrl+N does nothing. Ctrl+P unexpectedly navigates to the beginning of the input (like Ctrl+A).


Expected results:

On macOS, many Emacs-like keyboard shortcuts can be used in input fields. For example Ctrl+A and Ctrl+E for navigating to beginning and end of lie, respectively.

Ctrl+N should move focus to the next suggestion. Ctrl+P should move focus to previous suggestion. Both Safari and Chrome do this, and I expected Firefox to behave the same way.
(Reporter)

Updated

5 months ago
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64

Updated

5 months ago
Component: Untriaged → Keyboard Navigation

Updated

4 months ago
Priority: -- → P3

Comment 1

4 months ago
Hi there, any chance this will get fixed for 57? I'm on the developer release switching from Chrome and, small as this is, might be the deal-breaker for me. Kind of jarring to be unable to use the common macOS / Emacs controls.
Flags: needinfo?(dao+bmo)

Comment 2

4 months ago
(In reply to Martin Polden from comment #0)
> Expected results:
> 
> On macOS, many Emacs-like keyboard shortcuts can be used in input fields.
> For example Ctrl+A and Ctrl+E for navigating to beginning and end of lie,
> respectively.

Does this only fail in the location bar or in all input fields in Firefox?
Flags: needinfo?(dao+bmo) → needinfo?(ksagar1030)
(Reporter)

Comment 3

4 months ago
(In reply to Dão Gottwald [::dao] from comment #2)
> (In reply to Martin Polden from comment #0)
> > Expected results:
> > 
> > On macOS, many Emacs-like keyboard shortcuts can be used in input fields.
> > For example Ctrl+A and Ctrl+E for navigating to beginning and end of lie,
> > respectively.
> 
> Does this only fail in the location bar or in all input fields in Firefox?

It only fails in the location bar. The shortcuts work as expected in other input fields.

Comment 4

4 months ago
I suspect the problem is this controller:
https://dxr.mozilla.org/mozilla-central/rev/97efdde466f18cf580fda9673cf4c38ee21fc7b7/browser/base/content/urlbarBindings.xml#1038

It's only interested in customizing copy/cut commands but I guess it affects others too. What's the right way to implement this?
Component: Keyboard Navigation → Address Bar
Flags: needinfo?(ksagar1030) → needinfo?(ehsan)

Comment 5

4 months ago
Hmm, that controller looks good to me on a first glance at least, I can't think of anything obviously wrong with it.

Does the bug go away for example if you comment out <https://dxr.mozilla.org/mozilla-central/rev/97efdde466f18cf580fda9673cf4c38ee21fc7b7/browser/base/content/urlbarBindings.xml#88> and line 141?

A good way to debug this would be to set a breakpoint on nsXULControllers::GetControllerForCommand() and look for command names declared for bindings listed here: <https://searchfox.org/mozilla-central/rev/a4702203522745baff21e519035b6c946b7d710d/dom/xbl/builtin/emacs/platformHTMLBindings.xml#11>.
Flags: needinfo?(ehsan)

Updated

3 months ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [fxsearch]

Comment 6

3 months ago
Does this bug need anything on my end? Unfamiliar with the process. I followed up on the initial reporting.

Comment 7

3 months ago
No, I think comment 5 should contain enough information for someone to start working on the bug.  Thanks for the report, Karan!
You need to log in before you can comment on or make changes to this bug.