From f71b675228e4effe8f440a4fabc0f46c6a930f61 Mon Sep 17 00:00:00 2001 From: Mengci Cai Date: Fri, 20 Mar 2026 13:45:16 +0800 Subject: [PATCH] fix: prevent ListView overscroll in notification panel Added overscroll protection to the notification center ListView to prevent unwanted bounce-back behavior when scrolling beyond content boundaries. The fix includes three event handlers that monitor height, content height, and content position changes to ensure the scroll position stays within valid bounds. Implemented bounds checking in onHeightChanged, onContentHeightChanged, and onContentYChanged handlers to clamp the contentY position when it exceeds the content boundaries. This prevents the ListView from showing empty space when scrolled beyond the actual content area, which was causing visual glitches and inconsistent scrolling behavior. Influence: 1. Test scrolling to the top and bottom of notification list 2. Verify no empty space appears when reaching content boundaries 3. Check that normal scrolling behavior remains smooth 4. Test with various numbers of notifications (empty, few, many) 5. Verify scroll position is maintained during content updates PMS: BUG-284867 --- panels/notification/center/NotifyView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panels/notification/center/NotifyView.qml b/panels/notification/center/NotifyView.qml index d58fa671a..93db32f54 100644 --- a/panels/notification/center/NotifyView.qml +++ b/panels/notification/center/NotifyView.qml @@ -61,7 +61,7 @@ Control { id: view clip: true spacing: 10 - snapMode: ListView.SnapToItem + snapMode: ListView.NoSnap keyNavigationEnabled: false activeFocusOnTab: false boundsBehavior: Flickable.StopAtBounds