diff options
author | Jim Raykowski <raykowj@gmail.com> | 2018-11-01 13:23:22 -0800 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-02 07:22:52 +0100 |
commit | 1cc819c340885aebd9a8031f34e405a9f689db83 (patch) | |
tree | 7791ce1d9f7e219498702d11c67eeadf51fbed3a /svx | |
parent | 2f88877af05e1a277f68b07faabba0ccc3d86b3b (diff) |
Don't use ToolBox::KeyInput for escape key press in GalleryToolBox
GalleryToolBox is used in the Gallery deck/panel in the sidebar.
Guidelines for keyboard navigation in the sidebar are that Escape from
content moves focus to content panel title or in absence of panel title
to the deck title or if sidebar is floating and the deck has only one
panel move focus to the tab bar settings menu button. This patch removes
ToolBox key input method from being used to handle escape key input in
GalleryToolBox. This allows sidebar focus manger to provide the correct
behavior.
Change-Id: Iaf6fb404aae784b1119b5477948c4edb674a972a
Reviewed-on: https://gerrit.libreoffice.org/62768
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 3f045541d924..1337951b9894 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -364,7 +364,10 @@ GalleryToolBox::GalleryToolBox( GalleryBrowser2* pParent ) : void GalleryToolBox::KeyInput( const KeyEvent& rKEvt ) { if( !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) ) - ToolBox::KeyInput( rKEvt ); + { + if( KEY_ESCAPE != rKEvt.GetKeyCode().GetCode() ) + ToolBox::KeyInput(rKEvt); + } } |