Skip to content

fix(browser): the address field shows the I-beam over its whole box while it is edited - #1247

Merged
Hona merged 3 commits into
devfrom
cursor-fix/address-padding
Nov 25, 2026
Merged

Hona merged 3 commits into
devfrom
cursor-fix/address-padding

Conversation

@Hona

@Hona Hona commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

While the browser's address is being edited, the pointer shows the I-beam over the whole field, as the official app does. Before, only the text inside showed it: the field's padding and its leading icon showed the arrow. This is the last named cursor difference from the official app.

Why

Official's address field is cursor: text on the whole field (packages/gui-plugins/src/browser/bar.css:22). A press on the field itself, not on a child, gives the keyboard to the input (packages/gui-plugins/src/browser/panel.tsx:1000-1006).

Ours set the cursor on the field too (#1187), but while the address was edited the field had no press handler. An element with no handler is not under the pointer, so the cursor came from the pane behind it. #1187 named this gap; its pass then measured it:

Point in the field, while edited Official Before
On the text I-beam I-beam
The right end, inside the field's box I-beam The arrow
The top edge, inside the field's box I-beam The arrow

What changes

Two files of the browser plugin, Luau only. No Rust, and the plugin contract is unchanged.

  • plugins/browser/panel.luau: the field keeps its press handler while it is edited. At rest a press starts the edit, as before. While edited a press asks for focus.
  • plugins/browser/init.luau: focus gives the keyboard back to the input and changes nothing else: the text and the selection stay as they are. (edit selects the whole address, which is right at rest and wrong in the middle of typing.)

What a user sees

  • While typing an address, the I-beam over the whole field, not only over the text.
  • A press on the field's padding while typing keeps the edit and its text. Before, that press went to the pane behind the field.

Run

On this PR's Windows x64 build (head 60fa29155, run 45668462935), beside two builds without the change, each named with its case below:

Case Without the change With it
While edited, on the text I-beam I-beam
While edited, the right end inside the field's box The arrow I-beam
While edited, the top edge inside the field's box The arrow I-beam
Type abc, press the field's right end, type d The edit ends; no input is left The field reads abcd

Not run

  • The 101 stops of the cursor pass have not run on this head yet. They follow this merge as a sweep; a stop that differs is fixed forward.
  • macOS and Linux are compiled only.

Hona added 3 commits November 26, 2026 02:57
…hile it is edited

While the address was being edited the field had no press handler, so only the input inside it was under the pointer: its padding and its leading icon showed the arrow, where official's whole field is cursor: text (packages/gui-plugins/src/browser/bar.css:22). The field keeps a handler while edited: a press on its own box gives the keyboard back to the input, as official's does (panel.tsx:1000-1006), with the text and selection as they are.
@Hona
Hona marked this pull request as ready for review November 25, 2026 18:48
@Hona
Hona merged commit 04ce296 into dev Nov 25, 2026
7 checks passed
@Hona
Hona deleted the cursor-fix/address-padding branch November 25, 2026 18:48
Hona added a commit that referenced this pull request Nov 25, 2026
Hona added a commit that referenced this pull request Nov 25, 2026
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