mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
add enter to submit on input type
This commit is contained in:
@@ -107,6 +107,13 @@ export class Popup {
|
||||
// illegal argument
|
||||
}
|
||||
|
||||
this.input.addEventListener('keydown', (evt)=>{
|
||||
if (evt.key != 'Enter' || evt.altKey || evt.ctrlKey || evt.shiftKey) return;
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
this.completeAffirmative();
|
||||
});
|
||||
|
||||
this.ok.addEventListener('click', ()=>this.completeAffirmative());
|
||||
this.cancel.addEventListener('click', ()=>this.completeNegative());
|
||||
const keyListener = (evt)=>{
|
||||
|
Reference in New Issue
Block a user