title: Enabling a Menu item in the Main Menu in a SwiftUI macOS app?
body: <p>I've created a Main Menu item for <strong>File</strong>, called <strong>Refresh</strong>, mapped CMD-R to it. But for some reason, the Main Menu item is disabled, when launching the app.</p>
  
  <p>The settings are:
  <a href="https://i.stack.imgur.com/4MEai.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4MEai.png" alt="Refresh Menu Item details"></a></p>
  
  <p>But when I launch the app, the main menu shows the Refresh item as disabled. When I click on WKWebView view and press CMD-R, and then open the main menu, the Refresh item is enabled.</p>
  
  <p>How do I make the Refresh item enabled by default?
  <a href="https://i.stack.imgur.com/I8rPh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I8rPh.png" alt="Disabled Refresh menu item"></a></p>
  
  <p>EDIT: One very interesting detail: The minute I click on the WKWebView - the Refresh-item becomes active. So, should I have done this in a different way? I currently have it linked like this:</p>
  
  <p>Refresh Menu Item linked to First Responder, with <code>reloadFromOrigin:</code> selected.</p>