Bug 145959 - Context menu in Math text window doesn't stay if not enough space below cursor
Summary: Context menu in Math text window doesn't stay if not enough space below cursor
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2 tar...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Context-Menu
  Show dependency treegraph
 
Reported: 2021-11-30 07:53 UTC by Mike Kaganski
Modified: 2021-12-06 13:30 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Screen cast of bringing context menu in two positions (143.15 KB, image/gif)
2021-11-30 07:53 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2021-11-30 07:53:26 UTC
Created attachment 176585 [details]
Screen cast of bringing context menu in two positions

In Math' formula editing window, right-click to bring context menu.

1. If there's enough room *below* mouse cursor to fit the pop-up menu, it appears under the cursor, and stays after you release the right mouse button, allowing you to do the following clicks in normal way.

2. If there's not enough room *below* mouse cursor (e.g., the click is close to the bottom of the screen), then the pop-up menu appears above the cursor (as expected), but stays *only* as long as the right mouse button is pressed, and immediately disappears as soon as the button is released.

See the screencast for clarification.

Tested with Version: 7.2.3.2 (x64) / LibreOffice Community
Build ID: d166454616c1632304285822f9c83ce2e660fd92
CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

and current master.
Comment 1 Roman Kuznetsov 2021-12-02 19:41:33 UTC
confirm in

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d272bf4f8f3a083b8c37f7b10f89cd2bf76b7d21
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

and in 7.2.0.4

but not in 7.1.7.2

so it's a regression

I bisected this one in win64-7.2 bisect repo and got

sha: 4c8e2b47cb81a8b582d71db927682753c6d12ad9

https://git.libreoffice.org/core/commit/4c8e2b47cb81a8b582d71db927682753c6d12ad9

https://gerrit.libreoffice.org/c/core/+/115293

Added to CC: Caolán McNamara
Comment 2 Caolán McNamara 2021-12-02 20:33:43 UTC
I think how this works in vcl is that the popup has to be under the mouse pos, so its probably a positioning adjustment of something like move it -1 if using a fallback position to position the popup under the mouse.
Comment 3 Commit Notification 2021-12-03 13:40:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4321fb516f4a65b047b182c4cb6f9c9a232efd85

Resolves: tdf#145959 menu pos should be relative to SmCmdBoxWindow

It will be available in 7.4.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 2021-12-03 13:43:13 UTC
that seems to be the issue, fixed in trunk and backports to 7-3 and 7-2 in gerrit
Comment 5 Commit Notification 2021-12-03 15:03:03 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

Resolves: tdf#145959 menu pos should be relative to SmCmdBoxWindow

It will be available in 7.3.0.0.beta2.

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 2021-12-03 18:23:31 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/0d4568f4b082b0f3cce97b4f18c2dc1ff60aeb85

Resolves: tdf#145959 menu pos should be relative to SmCmdBoxWindow

It will be available in 7.2.4.

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 Roman Kuznetsov 2021-12-05 20:40:20 UTC
Verified in

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2934472ab888ebfe64a153984af2902fac63a7a0
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

Thank you, Caolán.
Comment 8 Christian Lohmaier 2021-12-06 13:30:12 UTC
7.2.4 was a hotfix release, updating target in status-whiteboard