1 parent e2ddf2d commit faef954Copy full SHA for faef954
1 file changed
src/views/DataManageModal.ts
@@ -1,4 +1,4 @@
1
-import { Modal } from 'obsidian';
+import { Modal, Scope } from 'obsidian';
2
import type CubicJBrewingPlugin from '../main';
3
import { t } from '../i18n/index';
4
import { BeanManagePanel } from './dataManage/BeanManagePanel';
@@ -22,6 +22,11 @@ export class DataManageModal extends Modal {
22
23
constructor(plugin: CubicJBrewingPlugin) {
24
super(plugin.app);
25
+ this.scope = new Scope(plugin.app.scope);
26
+ this.scope.register([], 'Escape', () => {
27
+ this.close();
28
+ return false;
29
+ });
30
this.beanPanel = new BeanManagePanel({
31
app: plugin.app,
32
vaultData: plugin.vaultData,
0 commit comments