Skip to content

fix(stage-layouts): avoid Safari Form Assistant - #2461

Open
luoling8192 wants to merge 8 commits into
mainfrom
luoling/fix/mobile-composer-form-assistance
Open

fix(stage-layouts): avoid Safari Form Assistant#2461
luoling8192 wants to merge 8 commits into
mainfrom
luoling/fix/mobile-composer-form-assistance

Conversation

@luoling8192

@luoling8192 luoling8192 commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace the mobile chat textarea with a plain-text contenteditable control.
  • This avoids Safari Form Assistant. Safari ignores autocomplete="off".
  • Keep the mobile composer at its resting width and one-line height while typing.
  • Preserve multiline text, plain-text paste, file paste events, and accessibility semantics.

Verification

  • pnpm -F @proj-airi/stage-tamagotchi exec vitest run src/renderer/components/InteractiveArea.browser.test.ts --project browser
  • pnpm typecheck
  • pnpm lint

Visual changes

Both captures use 390x844 CSS pixels and the same DPR.

Before After
Mobile chat composer before Mobile chat composer after
Mobile chat composer Mobile chat composer

Typed mobile draft

The empty composer and the hi draft both measure 32px tall at 390x844.

Typed mobile chat composer

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T15:31:16.900417Z ffcabe1 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

⏳ Approval required for deploying to Cloudflare Workers (Preview) for stage-web.

Name Link
🔭 Waiting for approval For maintainers, approve here

Hey, maintainers, kindly take some time to review and approve this deployment when you are available. Thank you! 🙏

@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: 9c3e1665ce

ℹ️ 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".

Comment thread packages/ui/src/components/form/content-editable/basic-content-editable.vue Outdated
Comment thread packages/ui/src/components/form/content-editable/basic-content-editable.vue Outdated

@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: 99e98e941c

ℹ️ 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".

Comment thread packages/ui/src/components/form/content-editable/index.ts
Comment thread packages/ui/src/components/form/content-editable/index.ts

@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: 3d62aaae58

ℹ️ 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".

Comment thread packages/ui/src/components/form/content-editable/basic-content-editable.vue Outdated
Comment thread packages/ui/src/components/form/content-editable/basic-content-editable.vue Outdated
Comment thread packages/ui/src/components/form/content-editable/basic-content-editable.vue Outdated

@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: 77a914ea3a

ℹ️ 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".

@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: ffcabe191b

ℹ️ 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".

Comment on lines +57 to +58
start: startRange.toString().length,
end: endRange.toString().length,

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 Account for line breaks when restoring the caret

When Shift+Enter creates a <br>, onInput forces DOM normalization, but Range.toString() does not count the rendered line break that innerText includes in the model. The saved offset therefore restores the caret before the new newline, so the next character is inserted on the preceding line instead of the new line. Fresh evidence beyond the earlier external-value report is this mismatch between the new offset algorithm and the component's own text serialization; derive offsets with the same line-break semantics.

Useful? React with 👍 / 👎.

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