diff options
| author | Doris Verria <doris.verria@qt.io> | 2024-04-10 19:10:21 +0200 |
|---|---|---|
| committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2024-04-12 09:21:05 +0000 |
| commit | 2e520c6cae19f472b1053bd572bc488e8e048559 (patch) | |
| tree | 028c05f570baf88cbfbd0dadcc5b5a5a49e146b1 /src/qmlworkerscript/qquickworkerscript.cpp | |
| parent | 9a66e7981202f9b465934e3dde43bbd44c54b4f8 (diff) | |
Take into account inactive window when restoring focus after popup close
When popup is closing we try to restore the focus to the last
activeFocusItem of the window if the popup(item) has active focus.
However, it might happen that the window is inactive when the popup
closes, and the poup/popupItem don't have activeFocus. Take this into
account when deciding if popup should restore focus.
Since QQuickWindow doesn't store the focusObject when window loses
focus, check if popupItem is focusObject by going down the window's
subFocusItem hierarchy. Ideally the window wouldn't clear the focus
object when it loses focus but that's a bigger change that requires
further investigation.
Fixes: QTBUG-84976
Pick-to: 6.7 6.5
Change-Id: Ib896cb74fa85d3b6f894a80b84f3ffba0fb9c72e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Diffstat (limited to 'src/qmlworkerscript/qquickworkerscript.cpp')
0 files changed, 0 insertions, 0 deletions
