You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first short press on a zap icon is not registered if a modal was closed before.
Steps to Reproduce
Open modal
Close modal
Click zap icon -> Zap not registered
Click zap icon again -> Zap registered
Expected behavior
Zaps are always registered
Video
2024-01-30.02-43-51.mp4
Additional context
I thought it might be related to the document losing focus on modal open and the modal not giving back focus to the document, but document.activeElement returned the same before and after a modal was closed.
Also, if you add onClick to a parent element (see video), it does get registered. So I think it's something wrong with LongPressable and not related to missing focus. Using raw HTML works as expected.
I think this was always the case but it annoyed me enough while working on #749 to create a ticket now for this and I found easy steps to reproduce now.
The text was updated successfully, but these errors were encountered:
- Extract handlers
- Remove unnecessary async keyword from callback
- Assign a new key to force remounting of LongPressable component when modal is closed from long press
- Remove hover state when closing modal, otherwise it stays colored
* Fix first zap when modal closed (#771)
- Extract handlers
- Remove unnecessary async keyword from callback
- Assign a new key to force remounting of LongPressable component when modal is closed from long press
- Remove hover state when closing modal, otherwise it stays colored
* Replace LongPressable with custom component
* Remove yarn.lock
Description
The first short press on a zap icon is not registered if a modal was closed before.
Steps to Reproduce
Expected behavior
Zaps are always registered
Video
2024-01-30.02-43-51.mp4
Additional context
I thought it might be related to the document losing focus on modal open and the modal not giving back focus to the document, but
document.activeElement
returned the same before and after a modal was closed.Also, if you add
onClick
to a parent element (see video), it does get registered. So I think it's something wrong withLongPressable
and not related to missing focus. Using raw HTML works as expected.I think this was always the case but it annoyed me enough while working on #749 to create a ticket now for this and I found easy steps to reproduce now.
The text was updated successfully, but these errors were encountered: