Closed Bug 1525910 Opened 5 years ago Closed 5 years ago

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

Categories

(Firefox :: Address Bar, enhancement, P2)

Unspecified
macOS
enhancement

Tracking

()

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: standard8, Assigned: dao)

References

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

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?

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.

OS: Unspecified → macOS

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

See Also: → 1528806
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Depends on: 1526815

(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)

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)
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
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
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)

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.

Attachment

General

Created:
Updated:
Size: