fix(blazor): guard Monaco against external-echo clobber while editing (typing does nothing)#290
Open
rbuergi wants to merge 1 commit into
Open
fix(blazor): guard Monaco against external-echo clobber while editing (typing does nothing)#290rbuergi wants to merge 1 commit into
rbuergi wants to merge 1 commit into
Conversation
… (typing does nothing) A data-bound Value can arrive on a re-render WHILE the user is mid-edit — a live node-stream echo behind MarkdownEditorView, or a lagging MessageText round-trip behind the chat composer. Reconciling it via SetValue wiped the in-progress keystrokes and reset the cursor: the chronic 'typing / backspace / arrows do nothing' report (Safari composer). Regressed when the single userIsTyping flag was dropped in 9084b7a. Two complementary suppressors on the OnAfterRenderAsync reconcile: • userIsTyping — set on each content change; suppresses the synchronous same-render echo the keystroke itself triggers, then re-arms. • editorHasFocus — set from Monaco's onDidFocus/BlurEditorText (JS → HandleFocusChanged); the user owns the buffer whenever focused, so ASYNC stream echoes are suppressed too. Legitimate programmatic pushes use SetValueAsync (set lastSetValue), so nothing real is blocked. NOTE: recovered from an uncommitted working-tree change this session; compiles under Portal build, needs a real-browser confirm in Safari before merge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Test Results (shard 4) 10 files ± 0 10 suites ±0 4m 43s ⏱️ + 1m 17s Results for commit 58c27ec. ± Comparison against base commit f057e77. This pull request removes 17 tests. |
Test Results 56 files ± 0 56 suites ±0 23m 16s ⏱️ + 3m 10s Results for commit 58c27ec. ± Comparison against base commit f057e77. This pull request removes 17 and adds 133 tests. Note that renamed tests count towards both. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recovers a complete-but-uncommitted fix for the chronic chat composer 'typing / backspace / arrows do nothing' bug (Safari). A data-bound
Valuearriving on a re-render mid-edit reconciled viaSetValueand wiped the in-progress keystrokes; regressed when theuserIsTypingflag was dropped in9084b7ad5.Two suppressors on the
OnAfterRenderAsyncreconcile:userIsTyping(synchronous same-render echo, re-arms) +editorHasFocus(async stream echoes while focused, from Monaco'sonDidFocus/BlurEditorText). Legitimate programmatic pushes useSetValueAsync, so nothing real is blocked.🤖 Generated with Claude Code