-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(ime): prevent form submission during IME composition steps #2279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ime): prevent form submission during IME composition steps #2279
Conversation
…ndition, other improvements
…pylon, intercom, mailchimp, loading optimizations (simstudioai#2132) * fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures (simstudioai#2115) * fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures * ack PR comments * ack * improvement(teams-plan): seats increase simplification + not triggering checkout session (simstudioai#2117) * improvement(teams-plan): seats increase simplification + not triggering checkout session * cleanup via helper * feat(tools): added sentry, incidentio, and posthog tools (simstudioai#2116) * feat(tools): added sentry, incidentio, and posthog tools * update docs * fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues * cleanup * enhance error extractor, fixed posthog tools * docs enhancements, cleanup * added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow * fix type errors * remove unnecessary comments * added vllm to docs * feat(i18n): update translations (simstudioai#2120) * feat(i18n): update translations * fix build --------- Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com> * improvement(workflow-execution): perf improvements to passing workflow state + decrypted env vars (simstudioai#2119) * improvement(execution): load workflow state once instead of 2-3 times * decrypt only in get helper * remove comments * remove comments * feat(models): host google gemini models (simstudioai#2122) * feat(models): host google gemini models * remove unused primary key * feat(i18n): update translations (simstudioai#2123) Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com> * feat(tools): added zendesk, pylon, intercom, & mailchimp (simstudioai#2126) * feat(tools): added zendesk, pylon, intercom, & mailchimp * finish zendesk and pylon * updated docs * feat(i18n): update translations (simstudioai#2129) * feat(i18n): update translations * fixed build --------- Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com> * fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal (simstudioai#2130) * fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal * fix failing test * fix test * cleanup * fix(custom-tools): add composite index on custom tool names & workspace id (simstudioai#2131) --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
… sendgrid, linkedin, more tools (simstudioai#2148) * feat(tools): added smtp, sendgrid, mailgun, linkedin, fixed permissions in context menu (simstudioai#2133) * feat(tools): added twilio sendgrid integration * feat(tools): added smtp, sendgrid, mailgun, fixed permissions in context menu * added top level mocks for sporadically failing tests * incr type safety * fix(team-plans): track departed member usage so value not lost (simstudioai#2118) * fix(team-plans): track departed member usage so value not lost * reset usage to 0 when they leave team * prep merge with stagig * regen migrations * fix org invite + ws selection' --------- Co-authored-by: Waleed <walif6@gmail.com> * feat(i18n): update translations (simstudioai#2134) Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com> * feat(creators): add verification for creators (simstudioai#2135) * feat(tools): added apify block/tools (simstudioai#2136) * feat(tools): added apify * cleanup * feat(i18n): update translations (simstudioai#2137) Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com> * feat(env): added more optional env var examples (simstudioai#2138) * feat(statuspage): added statuspage, updated list of tools in footer, renamed routes (simstudioai#2139) * feat(statuspage): added statuspage, updated list of tools in footer, renamed routes * ack PR comments * feat(tools): add generic search tool (simstudioai#2140) * feat(i18n): update translations (simstudioai#2141) * fix(sdks): bump sdk versions (simstudioai#2142) * fix(webhooks): count test webhooks towards usage limit (simstudioai#2143) * fix(bill): add requestId to webhook processing (simstudioai#2144) * improvement(subflow): remove all associated edges when moving a block into a subflow (simstudioai#2145) * improvement(subflow): remove all associated edges when moving a block into a subflow * ack PR comments * fix(polling): mark webhook failed on webhook trigger errors (simstudioai#2146) * fix(deps): declare core transient deps explicitly (simstudioai#2147) * fix(deps): declare core transient deps explicitly * ack PR comments --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
…lymarket, datadog, ahrefs, gitlab, shopify, ssh, wordpress integrations
…ding improvements, new slack tools
…opilot improvements
|
@mosaxiv is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
Greptile OverviewGreptile SummaryThis PR fixes an IME (Input Method Editor) bug where pressing Enter during text composition for Japanese, Chinese, or Korean input would unintentionally submit the chat message instead of finalizing the composed text. Key Changes
AnalysisThe fix is minimal, targeted, and follows the standard pattern for handling IME composition events in web applications. The Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant IME as Input Method Editor
participant Textarea
participant Handler as handleKeyDown
participant Submit as handleSubmit
Note over User,Submit: Scenario 1: IME Composition (Japanese/Chinese/Korean)
User->>IME: Type characters (e.g., "nihon")
IME->>Textarea: Start composition
User->>Textarea: Press Enter (to confirm IME)
Textarea->>Handler: KeyboardEvent (isComposing=true)
Handler->>Handler: Check: e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing
Note over Handler: isComposing=true, condition fails
Handler-->>Textarea: Allow default behavior (finalize composition)
IME->>Textarea: Finalize text (e.g., "日本")
Note over User,Submit: Scenario 2: Normal Enter Key Press
User->>Textarea: Type "hello"
User->>Textarea: Press Enter (to submit)
Textarea->>Handler: KeyboardEvent (isComposing=false)
Handler->>Handler: Check: e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing
Note over Handler: All conditions pass
Handler->>Handler: e.preventDefault()
Handler->>Submit: Call handleSubmit()
Submit->>Submit: Send message
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, no comments
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… docs, mcp, autolayout improvements (#2286) * fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead (#2273) * fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead * added backfill, added loading state for tools in settings > mcp * fix tool inp * feat(rate-limiter): token bucket algorithm (#2270) * fix(ratelimit): make deployed chat rate limited * improvement(rate-limiter): use token bucket algo * update docs * fix * fix type * fix db rate limiter * address greptile comments * feat(i18n): update translations (#2275) Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com> * fix(tools): updated kalshi and polymarket tools to accurately reflect outputs (#2274) * feat(i18n): update translations (#2276) Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com> * fix(autolayout): align by handle (#2277) * fix(autolayout): align by handle * use shared constants everywhere * cleanup * fix(copilot): fix custom tools (#2278) * Fix title custom tool * Checkpoitn (broken) * Fix custom tool flash * Edit workflow returns null fix * Works * Fix lint * fix(ime): prevent form submission during IME composition steps (#2279) * fix(ui): prevent form submission during IME composition steps * chore(gitignore): add IntelliJ IDE files to .gitignore --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: Waleed <walif6@gmail.com> Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com> * feat(ui): logs, kb, emcn (#2207) * feat(kb): emcn alignment; sidebar: popover primary; settings-modal: expand * feat: EMCN breadcrumb; improvement(KB): UI * fix: hydration error * improvement(KB): UI * feat: emcn modal sizing, KB tags; refactor: deleted old sidebar * feat(logs): UI * fix: add documents modal name * feat: logs, emcn, cursorrules; refactor: logs * feat: dashboard * feat: notifications; improvement: logs details * fixed random rectangle on canvas * fixed the name of the file to align * fix build --------- Co-authored-by: waleed <walif6@gmail.com> * fix(creds): glitch allowing multiple credentials in an integration (#2282) * improvement: custom tools modal, logs-details (#2283) * fix(docs): fix copy page button and header hook (#2284) * improvement(chat): add the ability to download files from the deployed chat (#2280) * added teams download and chat download file * Removed comments * removed comments * component structure and download all * removed comments * cleanup code * fix empty files case * small fix * fix(container): resize heuristic improvement (#2285) * estimate block height for resize based on subblocks * fix hydration error * make more conservative --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com> Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com> Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Co-authored-by: mosa <mosaxiv@gmail.com> Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com> Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.com>
Summary
When users type with an Input Method Editor (IME)—such as Japanese, Chinese, or Korean input—the Enter key is used to confirm the composed text, not to submit the message.
Previously, pressing Enter during this composition phase unintentionally triggered message submission.
This PR adds a check for e.nativeEvent.isComposing so that the message is only sent after the user has finished composing text.
Type of Change
Testing
Checklist
Screenshots/Videos