mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-01 03:47:12 +01:00
commit
f79f335491
@ -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)=>{
|
||||
@ -219,7 +226,7 @@ export function callGenericPopup(text, type, inputValue = '', { okButton, cancel
|
||||
text,
|
||||
type,
|
||||
inputValue,
|
||||
{ okButton, rows, wide, large, allowHorizontalScrolling, allowVerticalScrolling },
|
||||
{ okButton, cancelButton, rows, wide, large, allowHorizontalScrolling, allowVerticalScrolling },
|
||||
);
|
||||
return popup.show();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user