QuantumBar: Pressing the down key should first go to the end of line, then open the results

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P2
normal
RESOLVED FIXED
4 months ago
3 months ago

People

(Reporter: standard8, Assigned: dao)

Tracking

(Blocks 3 bugs)

unspecified
Firefox 67
Unspecified
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: [fxsearch])

Attachments

(1 attachment)

Reporter

Description

4 months ago

The behaviour of the existing URL bar when the down key is pressed is to first go to the end of line, then to open the results.

May want to check if this is Mac only behavior, on Windows I don't see that, unless steps differ. STR?

Reporter

Comment 2

4 months ago

Just found it, this is a Mac specific thing:

https://searchfox.org/mozilla-central/rev/e6520f0a4dd5d7474c32a1164744953ea59be0d0/toolkit/components/autocomplete/nsAutoCompleteController.cpp#486-503

STR

  • Type a few letters in the address bar
  • Move the cursor to earlier in the text
  • Press the down arrow

Expected Results

  • Cursor moves to end of text, with the popup not opening.

Actual Results

  • Popup opens, cursor moves to end of text.

Note, I think there's another issue where doing left-arrow doesn't close the popup. Will need to check if we have a bug for that.

Assignee

Updated

4 months ago
OS: Unspecified → macOS

It's an edge case anyway, let's move to release

Assignee

Updated

4 months ago
See Also: → 1528806
Assignee

Updated

4 months ago
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Assignee

Updated

4 months ago
Depends on: 1526815
Assignee

Comment 5

4 months ago

(In reply to Mark Banner (:standard8) (afk until Friday) from comment #2)

[...]

  • Press the down arrow

Expected Results

  • Cursor moves to end of text, [...]

Ehsan, do you know what makes this behavior platform-specific / where this is controlled in Gecko?

Flags: needinfo?(ehsan)

Comment 6

4 months ago

Yes, this is platform-specific.

Everywhere besides Mac, VK_DOWN on input controls is mapped to cmd_moveDown https://searchfox.org/mozilla-central/source/dom/xbl/builtin/ShortcutKeyDefinitionsForInputCommon.h#10. On Mac, there is no specific mapping for that key on input controls https://searchfox.org/mozilla-central/rev/dc0adc07db3df9431a0876156f50c65d580010cb/dom/xbl/builtin/mac/ShortcutKeyDefinitions.cpp#9. I don't remember off the top of my head what happens when there is no built-in mapping, I suggest breaking in TextInputListener::HandleEvent() to see what event handler is picked up for the keypress event on Mac.

Flags: needinfo?(ehsan)

Comment 7

3 months ago
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ee118b40f31
QuantumBar: Pressing the down key should first go to the end of line, then open the results. r=Standard8

Comment 8

3 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Assignee

Updated

3 months ago
Depends on: 1532738

I just found this autocomplete test covering this behavior, that was added in bug 231754. Could you please check we implemented the same behavior and there are no misses?
https://searchfox.org/mozilla-central/source/toolkit/content/tests/chrome/test_autocomplete_mac_caret.xul

Flags: needinfo?(dao+bmo)
Assignee

Comment 10

3 months ago

Yes, we implement the same behavior.

Flags: needinfo?(dao+bmo)
You need to log in before you can comment on or make changes to this bug.