diff --git a/src/util.ts b/src/util.ts index 7f7c558c..4bc0391a 100644 --- a/src/util.ts +++ b/src/util.ts @@ -84,7 +84,7 @@ export const eventPosition = (e: cg.MouchEvent): cg.NumberPair | undefined => { return; // touchend has no position! }; -export const isRightButton = (e: cg.MouchEvent): boolean => ((e.buttons ?? 0) & 2) === 2; +export const isRightButton = (e: cg.MouchEvent): boolean => e.button === 2; export const createEl = (tagName: string, className?: string): HTMLElement => { const el = document.createElement(tagName);