gembarrett / soap

SOAP is a free, online tool aimed at enabling civil society organisations and activist groups to build security policies that work for them.
https://usesoap.app
GNU General Public License v3.0
12 stars 4 forks source link

Edit mode trigger breaks in FF when focus is on Next button #135

Closed gembarrett closed 4 years ago

gembarrett commented 4 years ago

Describe the bug Small bug in the logic is breaking the "e" key triggering edit button click.

To Reproduce Steps to reproduce the behavior:

  1. Go to any point in build process
  2. Click on Next button
  3. Without clicking on screen or changing focus with tab, press "e" to trigger edit mode
  4. Without clicking on screen or changing focus with tab, press "e" again to close edit mode
  5. Notice the edit mode doesn't close and browser does not react until screen is clicked or focus is changed from Next button

Expected behavior Press e to trigger edit mode, press it again to close it. Should simulate click of edit button.

Desktop (please complete the following information):

Additional context Seems fine in Chrome.

gembarrett commented 4 years ago

Check what's in focus before proceeding to simulate button click