Skip to content

Prevent unfocused wheel changes in alternative save method setting - #13358

Open
droidmonkey with Copilot wants to merge 4 commits into
developfrom
copilot/fix-dropdown-value-change-on-scroll
Open

Prevent unfocused wheel changes in alternative save method setting#13358
droidmonkey with Copilot wants to merge 4 commits into
developfrom
copilot/fix-dropdown-value-change-on-scroll

Conversation

Copilot AI commented May 18, 2026

Copy link
Copy Markdown
Contributor

Scrolling the General settings page could change the Alternative storage method combobox when the cursor passed over it, even if the control was not focused. This could silently switch save behavior to a riskier option.

  • Behavior change

    • Apply the existing MouseWheelEventFilter to alternativeSaveComboBox in ApplicationSettingsWidget
    • Keep wheel scrolling on the settings page from mutating this combobox unless the user has explicitly focused it
  • Implementation

    auto mouseWheelFilter = new MouseWheelEventFilter(this);
    m_generalUi->faviconTimeoutSpinBox->installEventFilter(mouseWheelFilter);
    m_generalUi->alternativeSaveComboBox->installEventFilter(mouseWheelFilter);
    m_generalUi->toolButtonStyleComboBox->installEventFilter(mouseWheelFilter);

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https -Wall -Wextra -Wundef (dns block)
  • https://api.github.com/repos/keepassxreboot/keepassxc/releases/latest
    • Triggering command: /tmp/keepassxc-build/tests/gui/testgui /tmp/keepassxc-build/tests/gui/testgui testSettingsWheelDoesNotChangeAlternativeSaveMethodWithoutFocus -imultiarch x86_64-linux-gnu -MD src/CMakeFiles/keepassxc_gui.dir/keepassxc_gui_autogen/XJKH4KRZSW/qrc_wizard.cpp/home/REDACTED/work/keepassxc/keepassxc/tests/gui/PRIVATE -MF src/CMakeFiles/keepassxc_gui.dir/keepassxc_gui_autogen/XJKH4KRZSW/qrc_wizard.cpp/home/REDACTED/work/keepassxc/keepassxc/src/gui/entry -MT src/CMakeFiles/keepassxc_gui.dir/keepassxc_gui_autogen/XJKH4KRZSW/qrc_wizard.cpp.o -D_GNU_SOURCE -D_REENTRANT /gui�� LIB -DQT_DBUS_LI-DQT_GUI_LIB eEncryption.cpp.-DQT_NETWORK_LIB assxc/src e/keeshare_autogas utogen/include assxc/src arty/zxcvbn (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Agent-Logs-Url: https://github.com/keepassxreboot/keepassxc/sessions/b5c103c7-73ed-44cc-8b9f-bb5d0ce165d4

Co-authored-by: droidmonkey <2809491+droidmonkey@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unintended dropdown value changes while scrolling settings Prevent unfocused wheel changes in alternative save method setting May 19, 2026
Copilot AI requested a review from droidmonkey May 19, 2026 00:02
@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.45%. Comparing base (bbd4423) to head (8d6bd83).
⚠️ Report is 34 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #13358   +/-   ##
========================================
  Coverage    64.45%   64.45%           
========================================
  Files          378      378           
  Lines        39793    39794    +1     
========================================
+ Hits         25647    25649    +2     
+ Misses       14146    14145    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@droidmonkey
droidmonkey requested a review from phoerious May 19, 2026 03:00
@droidmonkey droidmonkey added the pr: bugfix Pull request fixes a bug label May 19, 2026
@droidmonkey droidmonkey added this to the v2.8.0 milestone May 19, 2026
@phoerious phoerious added the pr: ai-assisted Pull request contains significant contributions by generative AI label May 19, 2026
@droidmonkey
droidmonkey marked this pull request as ready for review May 19, 2026 13:50
Copilot AI review requested due to automatic review settings May 19, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent accidental changes to the Alternative storage method combobox in the General settings page when the user scrolls with the mouse wheel while the control is not focused, reducing the risk of silently switching to a more dangerous save mode.

Changes:

  • Install the existing MouseWheelEventFilter on alternativeSaveComboBox in ApplicationSettingsWidget to ignore wheel events when unfocused.

Comment thread src/gui/ApplicationSettingsWidget.cpp
Comment thread src/gui/ApplicationSettingsWidget.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: ai-assisted Pull request contains significant contributions by generative AI pr: bugfix Pull request fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unfocused mouse wheel changes alternative save methods setting

4 participants