framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.04k stars 3.23k forks source link

Bug click event with enter #4140

Open Simone4e opened 1 year ago

Simone4e commented 1 year ago

Describe the bug

The bug occurs when using a button/icon to open a function that opens a component, if after the component has opened you hit "enter" it will open again as the focus is still on the button

To Reproduce

Steps to reproduce the behavior:

  1. Go to codesandbox
  2. Click on popup/popover button bugged
  3. Press enter
  4. See error
  5. Open popup/popover button not bugged
  6. Press enter
  7. See no error

For resolve the problem we can use document.activeElement.blur(); on component open.