title: How to not try to trigger disabled buttons on pressing enter by default
body: <p>I have a react app, and when I was pressing enter it was triggering a hidden button, rather than the button that was showed.
  So I set it to disabled if hidden.</p>
  <p>But the problem now is that &quot;on enter&quot; nothing happens when that button is disabled. I imagine the default behaviour is to still try to trigger the closest button on the page (regardless of if it's disabled or not).</p>
  <p>Is there a way to alter this behaviour, or a different attribute (other than / side by side) the disabled attribute.</p>
  <p>I know this can be done instead:</p>
  <p><a href="https://reactgo.com/react-trigger-button-click/" rel="nofollow noreferrer">How to trigger a button click on Enter in React</a></p>
  <p>But I would prefer a cleaner way to monitoring which button should be triggered on enter at a specific time</p>