Created attachment 149988 [details] test file for header frame menu button key input caused misbehaviors Here are steps which show the frame menu button pop up menu unexpectedly displayed at the top of the writer window and menu item "Insert Page Number" selection resulting in the page number inserted in the main document. 1) Open the attached file (bugtest.odt) 2) On page 1 click in the header area or use keyboard shortcut Ctrl+Page Up to move to the header edit window 3) Click on Header (Default Style) v frame menu button 4) Press Escape key to collapse the pop up menu keyboard focus is now on the frame menu button 5) Press Page down key document page down action happens 6) Press Space key header frame menu button pop up menu appears at the top to the screen 7) Press Escape key 8) Press Page up key 9) Press Escape key cursor is displayed at the end of Page 1 in the main document and Header frame menu button is still visible (you may have to move the mouse pointer over to where the frame menu button would be to have it redraw) 9) Click on Header (Default Style) v frame menu button or press the Space key 10) Select Insert Page Number page number is inserted in main document resulting in Page 11
Created attachment 149989 [details] video demonstration of bug report
Thank you for reporting the bug. I can confirm the bug present in Version: 6.3.0.0.alpha0+ Build ID: b6b28931435e44aca92b8c0e1659f701e3ed1a87 CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; TinderBox: Win-x86@42, Branch:master, Time: 2019-01-30_06:57:04 Locale: en-US (en_US); UI-Language: en-US Calc: threaded
Code pointers: class SwHeaderFooterWin is the header/footer frame menu button. sw/source/uibase/inc/HeaderFooterWin.hxx Declare a function override of the inherited MenuButton:KeyInput function in class SwHeaderFooterWin. sw/source/uibase/docvw/HeaderFooterWin.cxx Add key input handling code to catch KEY_ESCAPE, KEY_SPACE, KEY_RETURN, and Mod2 + KEY_DOWN. For KEY_ESCAPE grab focus to the header/footer edit window. For KEY_SPACE, KEY_RETURN, and Mod2 + KEY_DOWN follow SwHeaderFooterWin base class hierachy to find how to execute its menu. Search code base for KeyInput to learn about vcl::Window::KeyInput handling function This is for the case when header/footer edit window is not empty. Currently there isn't a way that focus can be on the header/footer frame menu button when header/footer is empty but if suggested behavior change is made for Bug 124041 a check for empty/header footer edit window will be required so bonus points for implementing check here. There is additional code required to ensure the popup menu is displayed in the correct location when executed using key input. I can supply code pointers as needed.
(In reply to Jim Raykowski from comment #3) > There is additional code required to ensure the popup menu is displayed in > the correct location when executed using key input. Oops, not required here. This will be needed if suggested behavior change for Bug 124113 is implemented.
@Jim, since you provided the code pointers, can be turn this issue into an easyhack ? or you plan to work on this ?
I have some experience in resolving Header Footer bugs, would love to assign it to myself :-)
Dear Aditya Sahu, This bug has been in ASSIGNED status for more than 3 months without any activity. Resetting it to NEW. Please assigned it back to yourself if you're still working on this.
Oops, sorry about the 5 year gap. Let me try to close it ASAP.
I could not reproduce the bug according to description #c0 > 4) Press Escape key to collapse the pop up menu > keyboard focus is now on the frame menu button Pressing the escape key puts the focus on the header text and cursor is visible instead.
Yes, this seems to be WFM. Tested on kf6, gtk3, gen and Windows. Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: deaa5dc2a4d5446cdd120236615608702598e365 CPU threads: 2; OS: Windows 11 X86_64 (10.0 build 22621); UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-GB Calc: threaded Arch Linux 64-bit Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 4805277b8d3e93ac652a5ed66d0ed101d64a78c3 CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: CL threaded Built on 15 November 2024