Bug 157375 - LibreOffice shortcuts do not work right after opening new Writer or Calc document from the Start Center menu (cursor not in document)
Summary: LibreOffice shortcuts do not work right after opening new Writer or Calc docu...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Start-Center GTK3
  Show dependency treegraph
 
Reported: 2023-09-22 08:47 UTC by Tom
Modified: 2023-10-17 13:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom 2023-09-22 08:47:36 UTC
Description:
When I start LO per "libreoffice7.5 --safe-mode" or "libreoffice7.6 --safe-mode" and open a new Writer or Calc document per "File > New > Text Document" or "File > New > Spreadsheet" and try to close the new document right afterwards per shortcut Ctrl+W or Ctrl-Q and WITHOUT (!) having clicked with the mouse into the active document area before, any shortcut is ignored.

Steps to Reproduce:
1. Start LO per "libreoffice7.5 --safe-mode" or "libreoffice7.6 --safe-mode"
2. Open menu "File > New > Text Document" or "File > New > Spreadsheet" with the mouse
3. Click on the title bar of the LibreOffice Writer or Calc window, just to make sure that the window has the focus (do not click into the active document area)
4. Press Ctrl+Q, Ctrl+W, Ctrl+P or any other shortcut shown in the different menu items

Actual Results:
5. Nothing happens. LO is not terminated, the Writer document is not closed, no print dialog is opened.
6. HOWEVER, if I click into the active document area (the blank white page) of the Writer document so that afterwards the text cursor is displayed at the beginning of the first empty line (or select an arbitrary cell in the Calc spreadsheet with the mouse) and then repeat the aforementioned shortcuts, they are all recognized and executed.

BTW: The shortcut Ctrl+W is not displayed at the end of the menu item "File > Close" although it does work after step 6. Maybe it was forgotten to be added?

Expected Results:
Fundamental shortcuts like Ctrl+Q, Ctrl+W should work right after opening a new Writer or Calc document, even if the user has not clicked into the active document area before.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.5.6.2 (X86_64) / LibreOffice Community
Build ID: f654817fb68d6d4600d7d2f6b647e47729f55f15
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Tom 2023-09-26 19:40:39 UTC
The reported problem persists in

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: de-DE (en_US.UTF-8); UI: en-US
Calc: threaded

Regards
Tom
Comment 2 Stéphane Guillou (stragu) 2023-10-06 15:10:45 UTC
Thank you for the report.

Confirmed that the shortcuts don't do anything after creating a new Writer or Calc file with the File menu (or with the shortcut Ctrl + N), but after clicking in the document or even in the empty space next to a toolbar, the shortcuts do work.

Does not happen if:
- new document is created with the buttons on the left of the Start Centre
- Writer is opened directly with: libreoffice7.5 --writer

In both those cases, the on-document cursor is active, and shortcuts do work.

Instead of shortcuts, can be tested with trying to directly write text into the document / a cell.

Started in 7.5. Reproduced in:

Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 47eb0cf7efbacdee9b19ae25d6752381ede23126
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

but no repro in 7.4.7.2

Only affects gtk3 VCL plugin.

Bibisected with linux-64-7.5 repo to first bad commit 5aff684cb1e4e222c18f269685d9c468092100c8 which points to core commit:

commit 164a1f4c3315fc44161128d3d9ca886f767f7d30
author	Heiko Tietze	Fri Sep 09 16:07:28 2022 +0200
committer	Heiko Tietze Fri Sep 16 10:31:45 2022 +0200
Resolves tdf#80934 - GUI means to filter thumbnails in start center
Resolves also tdf#92499 by removing the (badly placed) context menus
from the left pane into the new "toolbar"
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139730

Heiko, can you please have a look?
Comment 3 V Stuart Foote 2023-10-06 19:58:54 UTC
Not clear it is all result of https://gerrit.libreoffice.org/c/core/+/139730

See also bug 97511 suggests the global shortcut handling at various locations get clobbered.
Comment 4 Heiko Tietze 2023-10-17 10:39:59 UTC
Repro with master and gtk3 but not kf5. And very unlikely related to the start center patch.
Comment 5 Stéphane Guillou (stragu) 2023-10-17 13:06:14 UTC
Note that you could rename the bug report to "New Writer or Calc document not focused when created from Start Center top menu", it's not necessarily a shortcut issue.

I checked again the bibisect:
- before 164a1f4c3315fc44161128d3d9ca886f767f7d30, can type directly into Calc and Writer.
- since 164a1f4c3315fc44161128d3d9ca886f767f7d30, can't type directly.