Skip to content

Omnibox suggestions - #481

Open
ianu82 wants to merge 2 commits into
pr/find-in-pagefrom
pr/omnibox-suggestions
Open

Omnibox suggestions#481
ianu82 wants to merge 2 commits into
pr/find-in-pagefrom
pr/omnibox-suggestions

Conversation

@ianu82

@ianu82 ianu82 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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.

  • ArrowUp / ArrowDown move through the rows (wrapping), Enter activates, Esc dismisses.
  • Tab rows switch to that tab; app rows open (or find-or-create) the app's tab; site rows navigate.
  • While the dropdown is open the native view hides — DOM can't paint over a WebContentsView — and comes back on dismiss. Same rule as the downloads shelf.

Stacked on pr/find-in-page.

For QA

  1. Click the address field: full URL appears selected and suggestions open.
  2. With several tabs open, type part of another tab's title: it appears; activating it switches to that tab instead of opening a duplicate.
  3. Type "gmail" (or any pinned app): the app row appears and opens the app.
  4. Type a site you visit often: it should surface from top sites; Enter navigates.
  5. The dropdown renders over the web page — no see-through holes — and Esc / clicking away dismisses it and restores the page.
  6. Submit a plain URL or search term as before: normal navigation unchanged.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ianu82 added 2 commits July 23, 2026 10:19
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.
@ianu82
ianu82 force-pushed the pr/omnibox-suggestions branch from ad2ec92 to 5097695 Compare July 23, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant