commit
f79f335491
|
@ -107,6 +107,13 @@ export class Popup {
|
||||||
// illegal argument
|
// 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.ok.addEventListener('click', ()=>this.completeAffirmative());
|
||||||
this.cancel.addEventListener('click', ()=>this.completeNegative());
|
this.cancel.addEventListener('click', ()=>this.completeNegative());
|
||||||
const keyListener = (evt)=>{
|
const keyListener = (evt)=>{
|
||||||
|
@ -219,7 +226,7 @@ export function callGenericPopup(text, type, inputValue = '', { okButton, cancel
|
||||||
text,
|
text,
|
||||||
type,
|
type,
|
||||||
inputValue,
|
inputValue,
|
||||||
{ okButton, rows, wide, large, allowHorizontalScrolling, allowVerticalScrolling },
|
{ okButton, cancelButton, rows, wide, large, allowHorizontalScrolling, allowVerticalScrolling },
|
||||||
);
|
);
|
||||||
return popup.show();
|
return popup.show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue