Bug 155716 - Context menu of the input line doesn't work on input line contents, unless left clicked first (gtk3)
Summary: Context menu of the input line doesn't work on input line contents, unless le...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha1+
Hardware: All Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:24.2.0 target:7.6.1 target:7.5.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Regressions-weld-InputBar
  Show dependency treegraph
 
Reported: 2023-06-07 14:57 UTC by Maxim Monastirsky
Modified: 2023-08-08 20:46 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 Maxim Monastirsky 2023-06-07 14:57:04 UTC
Steps to reproduce:

1. Open Calc with gtk3.
2. Type something in a cell, and click somewhere else to end editing mode.
3. Select the previously edited cell.
4. Right click on the input line of the formula bar, and choose "Select All" from the context menu.

Actual Results:
All cells are selected.

Expected Results:
All text inside the input line is selected.

This works correctly only if I left (or middle) click in the input line first, so it gets the focus. For comparison, kf5 and gen don't have this problem.
Comment 1 Adam664 2023-06-09 01:18:18 UTC
Confirmed with:

Version: 7.7.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5a2c6f4df7149f8c1f543f120fe19bd66abfc189
CPU threads: 1; OS: Linux 6.3; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

and

Version: 7.5.2.2 (X86_64)
Build ID: 50(Build:2)
CPU threads: 1; OS: Linux 6.3; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

If the second part of step 2 is skipped, i.e. editing mode is not ended, the results are what is expected. I'll let someone else confirm and set to NEW.
Comment 2 Stéphane Guillou (stragu) 2023-06-13 12:40:21 UTC
Confirmed with:

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

and since 7.1:

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

Unexpected for obvious reasons, but also inconsistent as using "Copy" does copy the inputbar contents.

Not reproduced in 7.0

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Bibisected with linux-64-7.1 repo to dc9b09a432399053d2e161059784484250f71620 which points to the weld inputbar commit:

commit e087e25f05e689091cbf1c4f91b6e93878ac17ec
author	Caolán McNamara <caolanm@redhat.com>	Mon Oct 05 14:19:05 2020 +0100
committer	Caolán McNamara <caolanm@redhat.com>	Fri Oct 16 12:54:14 2020 +0200
weld InputBar
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104037

Caolán, can you please have a look?
Comment 3 Commit Notification 2023-07-26 10:26:44 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7dc697addd0895b8aee0c051c0d4d4125414f012

Resolves: tdf#155716 grab focus when context menu is activated

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Caolán McNamara 2023-07-26 10:27:09 UTC
done in trunk, backports to 7-6 and 7-5 in gerrit
Comment 5 Commit Notification 2023-08-04 07:17:38 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/a581b38fad795490a5af6eb04da8e4848248e7e6

Resolves: tdf#155716 grab focus when context menu is activated

It will be available in 7.6.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2023-08-04 07:17:41 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/a0b0215f5adc68b02c86a7dac2c0f49a0f53f28c

Resolves: tdf#155716 grab focus when context menu is activated

It will be available in 7.5.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Stéphane Guillou (stragu) 2023-08-08 20:46:40 UTC
Fix verified in:

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

Thanks Maxim, Adam and Caolán!