mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
Fix spell check focus issues and prevent input clearing
- Added focus preservation after clicking misspelled words to maintain typing ability - Improved stale result detection by checking current textarea value instead of closure value - Removed problematic value dependency from performSpellCheck to prevent callback recreation - Ensures textarea stays focused and responsive during spell check interactions
This commit is contained in:
committed by
Alex Hancock
parent
23f285239e
commit
177586c985
@@ -545,6 +545,13 @@ export const RichChatInput = forwardRef<RichChatInputRef, RichChatInputProps>(({
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// Ensure textarea maintains focus after click
|
||||
setTimeout(() => {
|
||||
if (hiddenTextareaRef.current) {
|
||||
hiddenTextareaRef.current.focus();
|
||||
}
|
||||
}, 0);
|
||||
|
||||
if (misspelledData) {
|
||||
const rect = e.currentTarget.getBoundingClientRect();
|
||||
console.log('🖱️ CLICK: Element rect:', rect);
|
||||
|
||||
Reference in New Issue
Block a user