mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
Fix trackpad not switching tabs.
This commit is contained in:
parent
897fde7332
commit
d1c2672f99
2
src/public/app/types-lib.d.ts
vendored
2
src/public/app/types-lib.d.ts
vendored
@ -13,7 +13,7 @@ declare module "draggabilly" {
|
||||
containment: HTMLElement
|
||||
});
|
||||
element: HTMLElement;
|
||||
on(event: "pointerDown" | "pointerUp" | "dragStart" | "dragEnd" | "dragMove", callback: Callback);
|
||||
on(event: "staticClick" | "dragStart" | "dragEnd" | "dragMove", callback: Callback);
|
||||
dragEnd();
|
||||
isDragging: boolean;
|
||||
positionDrag: () => void;
|
||||
|
@ -676,14 +676,8 @@ export default class TabRowWidget extends BasicWidget {
|
||||
|
||||
this.draggabillies.push(draggabilly);
|
||||
|
||||
let pointerDownTime: number = 0;
|
||||
draggabilly.on("pointerDown", () => {
|
||||
pointerDownTime = Date.now();
|
||||
});
|
||||
draggabilly.on("pointerUp", () => {
|
||||
if (Date.now() - pointerDownTime < 200) {
|
||||
draggabilly.on("staticClick", () => {
|
||||
appContext.tabManager.activateNoteContext(tabEl.getAttribute("data-ntx-id"));
|
||||
}
|
||||
});
|
||||
|
||||
draggabilly.on("dragStart", () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user