Skip to content

fix(weather-editor): loss of focus on searchbar when typing#2145

Merged
davo0411 merged 1 commit into
community-shaders:devfrom
SkrubbySkrubInAShrub:WE-WW-Searchbar-focus
Apr 17, 2026
Merged

fix(weather-editor): loss of focus on searchbar when typing#2145
davo0411 merged 1 commit into
community-shaders:devfrom
SkrubbySkrubInAShrub:WE-WW-Searchbar-focus

Conversation

@SkrubbySkrubInAShrub
Copy link
Copy Markdown
Collaborator

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub commented Apr 17, 2026

Fixes bug where you would lose focus on the searchbar after entering 1 character, preventing the input of the next.

Summary by CodeRabbit

  • Bug Fixes
    • Improved search dropdown positioning and placement stability in the weather editor.
    • Refined search dropdown dismissal behavior to prevent unintended closing when clicking nearby areas.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cad85a04-8fca-48b1-bf24-0465c8492587

📥 Commits

Reviewing files that changed from the base of the PR and between a847bd9 and c0b98bf.

📒 Files selected for processing (1)
  • src/WeatherEditor/Weather/WeatherWidget.cpp

📝 Walkthrough

Walkthrough

Modified the search dropdown positioning and focus behavior in WeatherWidget. Replaced repeated cursor position calls with a single captured position, adjusted ImGui window flags to prevent automatic focus, and simplified dropdown dismissal to use only Escape key, removing focus-based closure logic.

Changes

Cohort / File(s) Summary
Search Dropdown Positioning & Focus
src/WeatherEditor/Weather/WeatherWidget.cpp
Refactored dropdown positioning to capture cursor position once instead of repeatedly; replaced focus behavior with ImGuiWindowFlags_NoFocusOnAppearing flag; added window-to-front call; simplified dismissal logic to use only Escape key instead of focus state.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • davo0411
  • alandtse

Poem

🐰 A dropdown finds its perfect place,
No wandering cursors, a focused grace,
With Escape alone to bid farewell,
The search behaves more smooth and well! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main issue being fixed: preventing loss of focus on the searchbar when typing.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions
Copy link
Copy Markdown

No actionable suggestions for changed features.

#include <format>

#include "imgui_internal.h"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this necessary or ai silly

@davo0411 davo0411 merged commit 2c306c7 into community-shaders:dev Apr 17, 2026
15 checks passed
@github-actions
Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

YtzyFvra pushed a commit to YtzyFvra/skyrim-community-shaders that referenced this pull request Apr 19, 2026
…y-shaders#2145)

Co-authored-by: SkrubbySkrubInAShrub <skrubbyskrubinashrub@gmail.com>
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 2, 2026
…y-shaders#2145)

Co-authored-by: SkrubbySkrubInAShrub <skrubbyskrubinashrub@gmail.com>
(cherry picked from commit 2c306c7)
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