Loyal-Young opened a new pull request, #6070:
URL: https://github.com/apache/rocketmq-dashboard/pull/6070

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6067
   
   ### Brief Description
   
   Treat native keyCode 229 as IME input alongside isComposing before handling 
Composer shortcuts. In WebKit's documented event-ordering case, compositionend 
precedes the confirming Enter keydown, so isComposing is already false. The 
current handler then submits and clears the draft.
   
   The shared Composer serves both Home and the AI page. The guard also keeps 
IME-owned Escape events out of the stop shortcut. Ordinary subsequent 
Enter/Escape events work immediately; no timer or UA detection is added.
   
   Browser reference: [WebKit bug 165004, comment 
4](https://bugs.webkit.org/show_bug.cgi?id=165004#c4). #2200 added the standard 
isComposing guard; this adds the missing fallback event shape.
   
   ### How Did You Test This Change?
   
   - Before the fix: 2 failures and 19 passes in Composer tests.
   - After the fix: all 21 pass.
   - Dispatch compositionend followed by a native Enter/Escape keydown with 
keyCode=229 and isComposing=false. Assert that the event is not prevented, no 
send/stop is invoked, and the draft is not cleared.
   - Immediately dispatch the corresponding ordinary key and verify send/clear 
or stop. Existing tests retain standard composition, Shift+Enter and 
stopping-state coverage.
   - ESLint, full app TypeScript check (`--noEmit --composite false 
--incremental false`), and `git diff --check`: passed.
   - These are event-level component tests in jsdom. Safari and a physical IME 
were not manually tested in this Windows environment.
   
   ### Checklist
   
   - [x] One coherent fix; Conventional Commit title.
   - [x] Regression test names end in Test.
   - [x] No new UI strings or API contracts.
   - [ ] Backend architecture tests not rerun (frontend-only change).
   
   ### Verification scope
   
   Local tests used snapshot 29fe48abc. The intervening upstream changes 
through 5e4c39b do not change either touched file; the published commit 
preserves that newer upstream tree. PR CI remains the integration check.
   
   ### AI assistance
   
   AI assistance was used to inspect the keyboard handler, consult the WebKit 
issue, implement the fallback and author the event regressions. The diff and 
test results were reviewed in this contribution session.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to