Skip to content

input are auto close fix#1854

Merged
simo6529 merged 1 commit intomainfrom
phone-writing-text-cant-add-images
Jan 28, 2026
Merged

input are auto close fix#1854
simo6529 merged 1 commit intomainfrom
phone-writing-text-cant-add-images

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Jan 28, 2026

Summary by CodeRabbit

  • Improvements
    • Enhanced editor options visibility with manual toggle control
    • Improved responsive behavior for different screen sizes
    • Better focus and blur handling for enhanced experience on smaller layouts

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

Changes introduce user-driven control logic for toggling editor options visibility in the CreateDrop component. State management was added to CreateDropContent to track user interactions separately from container width constraints. CreateDropInput now accepts a blur event handler callback to coordinate option visibility on narrower layouts.

Changes

Cohort / File(s) Summary
Options Visibility State Management
components/waves/CreateDropContent.tsx
Added userShowOptions state and closeOnNextInputRef to decouple user-driven visibility from container width. Introduced handleSetShowOptions() method to manage visibility toggles. Options now show based on isWideContainer || userShowOptions logic.
Editor Focus/Blur Handling
components/waves/CreateDropContent.tsx
Added handleEditorStateChange() and handleEditorBlur() handlers to hide options when editor loses focus on non-wide containers. Wired blur event to coordinate visibility state.
State Reset on Refresh
components/waves/CreateDropContent.tsx
Reset userShowOptions and closeOnNextInputRef.current during refreshState and file changes to align UI state with new options visibility behavior.
Component Prop Updates
components/waves/CreateDropContent.tsx, components/waves/CreateDropInput.tsx
Updated CreateDropActions to receive setShowOptions={handleSetShowOptions} instead of previous function. Extended CreateDropInput with new onEditorBlur prop to support blur-based option management.
Blur Event Forwarding
components/waves/CreateDropInput.tsx
Added optional onEditorBlur prop to CreateDropInput's public interface. Forwarded blur event from ContentEditable element to parent component handler.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A toggle, a touch, a blur and a gleam,
Options now dance to the user's own dream,
No width constraints shall dictate the show,
For blur and for interaction, they ebb and they flow!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and grammatically unclear ('input are auto close fix'), making it difficult to understand the specific change without reading the full context. Revise the title to be more descriptive and grammatically correct, such as 'Fix auto-closing of input options panel on blur' or 'Prevent auto-close of editor options on narrow containers'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@simo6529 simo6529 merged commit a2f4d82 into main Jan 28, 2026
6 checks passed
@simo6529 simo6529 deleted the phone-writing-text-cant-add-images branch January 28, 2026 14:35
@sonarqubecloud
Copy link
Copy Markdown

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.

2 participants