fix: fix popover behavior to accept click (default) OR hover event #678
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🐞[FIX]: Popover behavior for mobile
To adjust the behavior for mobile, the onTouch event was removed and the onClick event was preserved to keep the popover open without the need to keep pressing the button.
For this, the click event will be considered the default and a listener has been added for clicks outside the button element. The hover event has been kept as optional, if chosen the click event should be overridden for this behavior.
Keyboard event by default was also kept with click event.
Platforms 📲
Type of change 🔍
How Has This Been Tested? 🧪
[Enter the tips to test this PR]
Checklist: 🔍
Screenshots 📸
[BEFORE]
Bug report video:
scrnli_14_08_2023_12-03-45.2.mp4
[AFTER]
Mobile, after fix with click behavior
Gravacao.de.Tela.2023-08-22.as.10.59.00.mov
Mobile, after fix with click behavior and keyboard
Gravacao.de.Tela.2023-08-22.as.11.00.18.mov
Web, after fix with click and keboard
Gravacao.de.Tela.2023-08-22.as.11.01.35.mov
Web, after fix with hover option
Gravacao.de.Tela.2023-08-22.as.11.02.55.mov