Index: /trunk/src/org/openstreetmap/josm/actions/HelpAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/HelpAction.java	(revision 18110)
+++ /trunk/src/org/openstreetmap/josm/actions/HelpAction.java	(revision 18111)
@@ -10,4 +10,6 @@
 import java.util.Optional;
 
+import javax.swing.MenuElement;
+import javax.swing.MenuSelectionManager;
 import javax.swing.SwingUtilities;
 
@@ -51,5 +53,18 @@
         if (e.getActionCommand() == null) {
             String topic;
-            if (e.getSource() instanceof Component) {
+            MenuElement[] menuPath = MenuSelectionManager.defaultManager().getSelectedPath();
+            if (menuPath.length > 0) {
+                // Get help topic from last element in selected menu path (usually a JMenuItem).
+                // If a JMenu is selected, which shows a JPopupMenu, then the last path element
+                // is a JPopupMenu and it is necessary to look also into previous path elements.
+                topic = null;
+                for (int i = menuPath.length - 1; i >= 0; i--) {
+                    Component c = menuPath[i].getComponent();
+                    topic = HelpUtil.getContextSpecificHelpTopic(c);
+                    if (topic != null) {
+                        break;
+                    }
+                }
+            } else if (e.getSource() instanceof Component) {
                 Component c = SwingUtilities.getRoot((Component) e.getSource());
                 Point mouse = c.getMousePosition();
