-
Notifications
You must be signed in to change notification settings - Fork 322
update the highlight effect display for the confirm popup #1207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
update the highlight effect display for the confirm popup #1207
Conversation
Can't accept this, it works with a keyboard and the logic you have added is not relevant unfortunately. We have already discussed it with designers and decided it should work like this. The code itself can be shortened this way:
Changing n to null will result in an error with the next keypress as it adds arrow derection as |
Hello, if (this.n === null) {
this.n = 0;
this.setHighlight();
return;
} |
According to my tests, you can still navigate using the keyboard. I haven’t removed any functionality; I’ve just set it so that no option is selected by default. You can still use the arrow keys to select an option and press Enter to confirm. video.mp4 |
Thank you for your valuable suggestion! I've pushed a new commit to implement it. 😊 |
this is not the best solution, you check it in arrow shortcut, while you can press enter when n is null and will still get an error. |
keyboard.shortcut('enter, space', e, () => {
e.stopPropagation();
const buttons = $(this.refButtons).find('.button');
if (buttons[this.n]) { // here
$(buttons[this.n]).trigger('click');
};
}); I'm not entirely sure, but is the error coming from here? It seems like |
It will be undefined and the enter won’t work, this is not the desired behaviour. You should be able to just press enter without hovering the button with a mouse. |
Description
Currently, the confirm popup highlights the confirm button by default, even before you hover your cursor over it. Additionally, the last button that was highlighted remains highlighted even after moving the cursor away. I think this is a bit unintuitive and could cause confusion.
video.mp4
After modification:
video.mp4
What type of PR is this? (check all applicable)
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?