Skip to content

Commit

Permalink
fix(common): Context menu doesn't work on Firefox (#1494)
Browse files Browse the repository at this point in the history
  • Loading branch information
aziz-access authored Nov 13, 2023
1 parent 345f1f2 commit 65776d2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ export class ContextMenuDirective {
public onContextMenu(e: MouseEvent | TouchEvent): void {
let x;
let y;
if (e instanceof TouchEvent) {
x = e.touches[0].pageX;
y = e.touches[0].pageY;
} else if (e instanceof MouseEvent) {
if (e instanceof MouseEvent) {
x = e.x;
y = e.y;
} else if (e instanceof TouchEvent) {
x = e.touches[0].pageX;
y = e.touches[0].pageY;
}
if (!x || !y) {
return;
Expand Down

0 comments on commit 65776d2

Please sign in to comment.