Bug 149888 - F1 does not work in Math's default position
Summary: F1 does not work in Math's default position
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard: target:24.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-07 06:58 UTC by Mike Kaganski
Modified: 2023-07-26 21:30 UTC (History)
2 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 Mike Kaganski 2022-07-07 06:58:15 UTC
When one presses F1 in Start Center, one gets to "Start Center" help page [1]. Pressing F1 in the Writer main window expectedly opens "https://help.libreoffice.org/7.3/en-US/text/swriter/main0000.html?System=WIN&DbPAR=WRITER&HID=SW_HID_EDIT_WIN#bm_id3147244" help page [2].

OTOH, pressing F1 in Math does not open any help at all. Using Help->LibreOffice Help (F1) *menu* brings one to module-agnostic "The LibreOffice Help" page [3].

Note that the *menu* works this way in any module - so it is misleading when it shows the mnemonic F1, because it is *not* the same as F1 (which is bad).

[1] https://help.libreoffice.org/7.3/en-US/text/shared/guide/startcenter.html?System=WIN&DbPAR=WRITER&HID=sfx/ui/startcenter/open_recent#bm_id1022200910595545
[2] https://help.libreoffice.org/7.3/en-US/text/swriter/main0000.html?System=WIN&DbPAR=WRITER&HID=SW_HID_EDIT_WIN#bm_id3147244
[3] https://help.libreoffice.org/7.3/en-US/text/shared/05/new_help.html?System=WIN&DbPAR=MATH&HID=.uno:HelpIndex#bm_id3806162
Comment 1 Rafael Lima 2022-07-07 19:48:11 UTC
I can confirm this. Pressing F1 right after opening LO Math does not open any help page.

The formula editor should be able to open a Help page when F1 is pressed. The help ID is defined at the widget level, but when you start typing an equation and press F1 nothing happens.

Moreover, going to Help - LibreOffice Help causes the help to open the generic HID=.uno:HelpIndex, which is the same for all LO applications.
Comment 2 Rafael Lima 2023-07-20 14:03:51 UTC
Hi Mike, I found this in the code:
https://opengrok.libreoffice.org/xref/core/starmath/source/view.cxx?r=359e2be9#1047

It is basically saying that the initial GrabFocus() call messes up the help.

I tried getting around it in many ways, but no success.
Comment 3 Rafael Lima 2023-07-20 18:52:06 UTC
Here's the proposed fix:
https://gerrit.libreoffice.org/c/core/+/154691

Note that the fix above requires the following patch in the helpcontent2 repo:
https://gerrit.libreoffice.org/c/help/+/154692
Comment 4 Commit Notification 2023-07-21 12:00:25 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/0a11014c12d12432e66be19775a44761a8282599

tdf#149888 Create HID target for Math's main help page
Comment 5 Commit Notification 2023-07-26 21:29:33 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1f10a5b5a04a9d0cd5f456293e62e4f2c0fd7bb3

tdf#149888 Make F1 work in Math initial state

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.