diff options
| author | Pan Zhang <[email protected]> | 2026-03-13 16:32:51 +0800 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-03-14 13:37:25 +0000 |
| commit | cde91dd71a89d1f82bc87dabe95643cc93853e50 (patch) | |
| tree | 2f8bb4d30510174016cd0f169ab9b4dc393890b6 /src/animatedheightwidget.h | |
| parent | e59b657debc8aafd4ef119fd712fcd91b705bcbd (diff) | |
animatedheightwidget: prevent viewport scrolling
The search field moves upwards and becomes obscured when pressing navigation keys like the down arrow. This happens because the underlying QScrollArea processes keyboard navigation events, shifting the visible viewport even when scrollbars are completely hidden and disabled.
Move the event filter from the contents container directly to the QScrollArea (m_contentsContainerParent) and its viewport. Update the filter to intercept Qt::Key_Up and Qt::Key_Down events, preventing the scroll area from handling these inputs.
BUG: 510469
Diffstat (limited to 'src/animatedheightwidget.h')
| -rw-r--r-- | src/animatedheightwidget.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/animatedheightwidget.h b/src/animatedheightwidget.h index 3933df93f..92701bd25 100644 --- a/src/animatedheightwidget.h +++ b/src/animatedheightwidget.h @@ -57,8 +57,9 @@ protected: protected: /** - * Ignore PageUp/PageDown key events to prevent the internal QScrollArea - * (with an invisible scrollbar) from scrolling while editing inside child widgets. + * Ignore Up/Down/PageUp/PageDown key events for the internal QScrollArea + * (with an invisible scrollbar) to prevent it from scrolling and moving the + * visible region of contained widgets such as the search bar. */ bool eventFilter(QObject *obj, QEvent *event) override; |
