Omnibox suggestions - #481
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad2ec92149
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| } else if (e.key === 'Enter') { | ||
| e.preventDefault(); | ||
| if (open && rows[selected]) { activate(rows[selected]); return; } |
There was a problem hiding this comment.
Preserve Enter navigation for the typed URL
When the omnibox is focused on an existing page, onFocus seeds draft with fullUrl, and buildRows includes that active tab as selected row 0. Because Enter now always activates rows[selected] while the dropdown is open, Cmd+L/click followed by Enter calls onActivateTab for the current tab instead of onSubmit(fullUrl), so the address bar no longer reloads/navigates to the typed URL unless users first dismiss suggestions. Keep the raw-submit path unless the user explicitly chooses a suggestion.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed — Enter submits the typed text unless the user explicitly arrow-picked a suggestion; typing resets the pick, mouse rows still activate on click (5097695).
The address field now opens a dropdown on focus: open tabs (switch), pinned apps (open), top sites from history (navigate), and a Google search row — substring-filtered as you type, arrow keys to move, Enter to commit, first Esc closes the dropdown (second Esc reverts). Rows activate on mousedown so the blur never eats the click. While the dropdown is open the native view detaches (DOM can't paint over it), toggled explicitly through onSuggestionsToggle rather than the modal observer.
Codex on #481: focusing the omnibox seeds the draft with the full URL and selects row 0, so ⌘L→Enter (and type→Enter) activated that row instead of submitting the typed text — reload/navigate broke whenever the dropdown was open. Enter now activates a suggestion only after an explicit arrow-key pick; typing resets the pick; mouse rows still activate on click.
ad2ec92 to
5097695
Compare
What
Focusing the address field now earns its keep: the pretty URL swaps to the full URL (pre-selected for retyping), and a suggestion dropdown opens built from open tabs, your sidebar apps, and top sites, filtered live as you type.
Stacked on
pr/find-in-page.For QA