frontend: ask user if terminal should be really closed on ctrl+w
This commit is contained in:
@@ -282,6 +282,12 @@ export default {
|
||||
|
||||
window.document.title = `Terminal - ${this.name}`;
|
||||
|
||||
window.addEventListener('beforeunload', function (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}, true );
|
||||
|
||||
window.addEventListener('keydown', (event) => {
|
||||
if (event.key === 'C' && (event.ctrlKey || event.metaKey)) { // ctrl shift c
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user