diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-02-21 16:34:07 +0000 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-02-22 10:31:08 +0000 |
commit | 0ed7b3fe06168e66b8b8c2fca0307092bb69b3c7 (patch) | |
tree | f66b39747e6bcd46b71991bc4e7cc0bda7f45c8d /svx | |
parent | 59cfe55463526332e0ae91882cd8ccd187aa91e2 (diff) |
Resolves: tdf#148047 don't move focus if dropdown is active
a bit of a corner case, for the popover gtk sets the focus in two
steps, one to null, then to the final widget, not in just one step.
On seeing the interim null case we assume that focus was lost and
set it to the parent, which causes the popover to be dismissed
while it's still appearing. Workaround this by ignoring the grab
to parent while the popover is active.
Change-Id: I1bdef51731bf714de2df93fbe6694e9ed3e366d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147368
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/fillctrl.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index cfb7583be12c..ced69cbdf2c7 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -1084,4 +1084,13 @@ void FillControl::DataChanged(const DataChangedEvent& rDCEvt) InterimItemWindow::DataChanged(rDCEvt); } +void FillControl::GetFocus() +{ + // tdf#148047 if the dropdown is active then leave the focus + // there and don't grab back to a different widget + if (mxToolBoxColor->get_menu_item_active(".uno:FillColor")) + return; + InterimItemWindow::GetFocus(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |