-
-
Notifications
You must be signed in to change notification settings - Fork 45
Backmerge Commcare 2.61.2 #3453
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
Conversation
…during-text-change Prevent Combobox dropdown list dismissal during text changed event
📝 WalkthroughWalkthroughThis PR modifies ComboboxWidget to fix dropdown dismissal during text input. A new private boolean field Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
app/src/org/commcare/views/widgets/ComboboxWidget.java (1)
32-32: Consider a clearer flag name.The name
wasWidgetChangedOnTextChangedis somewhat ambiguous. Names likeisHandlingTextChangeorisProcessingTextInputwould more clearly convey that this flag is active during text change processing rather than indicating a past state.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/src/org/commcare/views/widgets/ComboboxWidget.java(3 hunks)
🔇 Additional comments (2)
app/src/org/commcare/views/widgets/ComboboxWidget.java (2)
99-104: LGTM - Proper use of try/finally for state management.The try/finally block ensures the flag is always reset, even if
widgetEntryChanged()throws an exception. This prevents the dropdown dismissal from being permanently disabled due to an uncaught exception.
124-126: LGTM - Fix prevents dropdown dismissal during text input.The conditional dismissal correctly addresses the UX issue where typing would close the dropdown. The flag ensures the dropdown remains visible during text change handling while still being dismissed in other contexts (item selection, focus loss, form submission).
Product Description
Backmerge CommCare 2.61.2