mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Make ST-style buttons keyboard selectable
- Make ST-style buttons keyboard selectable - Allow custom classes/selectors to be set as buttons too, with the same functionality (CSS selector-based) - Observer to automatically add functionality to any button added to the DOM - Allow buttons to not be selectable via 'disabled' or 'not_focusable'
This commit is contained in:
@ -189,8 +189,8 @@ export class Popup {
|
||||
break;
|
||||
}
|
||||
case 'Enter': {
|
||||
// Only count enter if no modifier key is pressed
|
||||
if (evt.altKey || evt.ctrlKey || evt.shiftKey)
|
||||
// CTRL+Enter counts as a closing action, but all other modifiers (ALT, SHIFT) should not trigger this
|
||||
if (evt.altKey || evt.shiftKey)
|
||||
return;
|
||||
|
||||
// Check if we are the currently active popup
|
||||
|
Reference in New Issue
Block a user