mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
fix(mobile): fix closing tab not always working on iOS
This commit is contained in:
parent
25cf16c101
commit
4c44ce0ebe
@ -28,7 +28,7 @@ const TAB_TPL = `
|
||||
<div class="note-tab-drag-handle"></div>
|
||||
<div class="note-tab-icon"></div>
|
||||
<div class="note-tab-title"></div>
|
||||
<div class="note-tab-close bx bx-x" title="${t("tab_row.close_tab")}" data-trigger-command="closeActiveTab"></div>
|
||||
<div class="note-tab-close bx bx-x" title="${t("tab_row.close_tab")}"></div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
@ -430,6 +430,11 @@ export default class TabRowWidget extends BasicWidget {
|
||||
return true; // event has been handled
|
||||
}
|
||||
});
|
||||
|
||||
$tab.find(".note-tab-close").on("click", (e) => {
|
||||
this.triggerCommand("closeActiveTab", { $el: $(e.target) });
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
get activeTabEl() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user