Skip to content

Keep the share dialog's role select open when clicked - #1891

Closed
Polleps wants to merge 1 commit into
developfrom
claude/nice-rubin-82ayvd-share-dialog-select
Closed

Polleps wants to merge 1 commit into
developfrom
claude/nice-rubin-82ayvd-share-dialog-select

Conversation

@Polleps

@Polleps Polleps commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Related Issues

No issue; reported directly: in the share dialog, the "Can write / Can read" select next to the email field opened and closed again right away. Bitwarden also tried to fill the email field.

Root cause

EmailInviteInput wraps the chips, the input and the RoleSelect in one Field div with onClick={() => inputRef.current?.focus()}, so the whole box acts like one textbox. That handler also ran for clicks on the native <select>. The select opens its list on mousedown. The click that follows bubbled up to Field, which moved focus to the input. That blurred the select, and a native select closes its list when it loses focus.

Reproduced in Chromium with Playwright on a minimal copy of the markup: after click('#sel'), document.activeElement was the input and select.matches(':open') was false. With the fix, focus stays on the select and :open is true.

Fix

  • browser/data-browser/src/components/Share/EmailInviteInput.tsx: Field now focuses the input only when the click lands outside its controls (select, button, input). Clicking the empty part of the box, or a chip's text, still focuses the input.
  • Password managers: the input keeps type="email" (so the email keyboard and validation still work). It now has autocomplete="off" and the opt-out hints the common managers read: data-bwignore (Bitwarden), data-1p-ignore (1Password), data-lpignore="true" (LastPass) and data-form-type="other" (Dashlane). autocomplete="email" was the wrong value here anyway: it means "the user's own address", and this field takes other people's addresses. No web standard makes every password manager skip a field, so these vendor attributes are the usual approach. They have no effect on browsers or other tools.
  • EmailInviteInput.test.tsx (new, jsdom): checks that clicking the select leaves focus on it, that clicking the field's background focuses the input, and that the opt-out attributes are present. Without the fix, the select test and the attributes test fail.
  • browser/CHANGELOG.md: added an entry.

No screenshots, because nothing changes visually. The change is to focus behaviour.

Checklist

  • Add changelog entry linking to issue, describe API changes
  • Add or update tests if needed
  • Update docs if needed (not needed)

🤖 Generated with Claude Code

https://claude.ai/code/session_01P648McUYrscNsheXY5Ya81


Generated by Claude Code

The email invite field focused its input on every click inside it,
including clicks on the "Can write / Can read" select. Moving focus to
the input blurred the native select right after it opened its option
list, so the list closed again. The field now only focuses the input
when the click lands outside its controls.

The input also asks password managers not to fill it (data-bwignore,
data-1p-ignore, data-lpignore, data-form-type) and uses
autocomplete="off", since it holds other people's addresses rather than
the user's own. It stays type="email".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P648McUYrscNsheXY5Ya81
@Polleps
Polleps marked this pull request as ready for review September 29, 2026 14:33
joepio added a commit that referenced this pull request Sep 30, 2026
…ent images, onboarding recovery fixes (#1915)

Lands #1889 (edit agents, skills and MCP servers in a dialog), #1890 (sidebar account menu in place of the App panel), #1891 (share dialog role select stays open), #1895 (document images from the local blob store) and #1917 (onboarding recovery, metadata request bursts, local bootstrap), tested together on Mancave.
@joepio joepio closed this Sep 30, 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.

3 participants