Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#21148 closed defect (fixed)

[Patch] Context specific help (F1) not properly working in menus

Reported by: skyper Owned by: Don-vip
Priority: normal Milestone: 21.07
Component: Core Version: latest
Keywords: template_report context sensitive help menu item Cc: DevCharly

Description (last modified by skyper)

What steps will reproduce the problem?

  1. Select a way
  2. Hoover the mouse over File menu -> Download data
  3. Press F1

What is the expected result?

The existing wiki page for the action is opened in help browser

What happens instead?

I land at the main help page.

Please provide any additional information below. Attach a screenshot if possible.

Hoovering over the button in Main Toolbar, the proper path is used but all menu items are affected.
Both Dark modes suffer the same issue.

Does not happen when using metal

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-07-20 19:23:32 +0200 (Tue, 20 Jul 2021)
Revision:18078
Build-Date:2021-07-20 17:59:14

Look and Feel: com.formdev.flatlaf.FlatIntelliJLaf

Plugins:
+ flatlaf (35734)

Attachments (1)

JOSM-context-help.diff (1.7 KB ) - added by DevCharly 4 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 by skyper, 4 years ago

Keywords: sensitive added

comment:2 by skyper, 4 years ago

Cc: DevCharly added
Component: Plugin utilsplugin2Plugin flatlaf
Description: modified (diff)
Keywords: menu item added
Owner: changed from team to simon04
Summary: Context specific help (F1) not properly working for many actionsContext specific help (F1) not properly working for in menu

Oh no, again the flatlaf plugin and all menu items suffer the same issue. I changed the description.

comment:3 by skyper, 4 years ago

Summary: Context specific help (F1) not properly working for in menuContext specific help (F1) not properly working in menus

comment:4 by DevCharly, 4 years ago

This also depends on the used Java version.
In Java 11 and FlatLaf it works.
In Java 8 and FlatLaf it does not...

comment:5 by DevCharly, 4 years ago

Ok, forget my previous comment. It has nothing to do with used Java version.

It depends on whether the menu fits into the main window or not.

If it fits, then a light-weight popup is used and F1 works as expected.

If the menu is large and does not fit into the main window, then a heavy-weight popup is used to display the menu (because it is partly outside of the main frame). Then the implementation in JOSM's HelpAction class does not find the menu item and F1 does not work correctly.

This is not related to FlatLaf.
It occurs in all L&Fs.

by DevCharly, 4 years ago

Attachment: JOSM-context-help.diff added

comment:6 by DevCharly, 4 years ago

I've attached a patch that first looks into MenuSelectionManager for selected menu item.

in reply to:  5 comment:7 by skyper, 4 years ago

Replying to DevCharly:

It depends on whether the menu fits into the main window or not.

No, it happens in all cases with the flatlaf plugin. I first noticed this with utilsplugin2 items like "More Tools -> Split Object" or "Selection -> Undo Selection" which work fine with "Metal".

comment:8 by DevCharly, 4 years ago

No, it happens in all cases with the flatlaf plugin.

Aha, yes, then you're on Linux or macOS, right?
On these two platforms, FlatLaf always uses heavy-weight popups because then the OS adds drop shadows to the popup.
I've tested only on Windows. Sorry.

Anyway, the patch should work on all platforms :)

comment:9 by skyper, 4 years ago

Component: Plugin flatlafCore
Owner: changed from simon04 to team
Version: latest

Arrg, sorry I forgot:

Identification: JOSM/1.5 (18097 en) Linux Debian GNU/Linux 10 (buster)
Java version: 11.0.12+7-post-Debian-2deb10u1, Debian, OpenJDK 64-Bit Server VM

comment:10 by skyper, 4 years ago

Summary: Context specific help (F1) not properly working in menus[Patch] Context specific help (F1) not properly working in menus

comment:11 by Don-vip, 4 years ago

Milestone: 21.07
Owner: changed from team to Don-vip
Status: newassigned

comment:12 by Don-vip, 4 years ago

Resolution: fixed
Status: assignedclosed

In 18111/josm:

fix #21148 - fix context specific help (F1) usage in menus (patch by DevCharly)

comment:13 by Don-vip, 4 years ago

Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.