Skip to content

Commit 922e7c0

Browse files
committed
fix: context menu prevent default
1 parent eb9d6b3 commit 922e7c0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib/images.svelte

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<div class="col-span-7 h-full">
3131
<div>
3232
<img
33-
on:contextmenu={() => {
33+
on:contextmenu|preventDefault={() => {
3434
return false;
3535
}}
3636
on:pointerdown={() => attack(selected_scale.notes[0])}
@@ -45,7 +45,7 @@
4545
<div class="flex flex-row">
4646
<div>
4747
<img
48-
on:contextmenu={() => {
48+
on:contextmenu|preventDefault={() => {
4949
return false;
5050
}}
5151
on:pointerdown={() => attack(selected_scale.notes[3])}
@@ -58,7 +58,7 @@
5858
</div>
5959
<div>
6060
<img
61-
on:contextmenu={() => {
61+
on:contextmenu|preventDefault={() => {
6262
return false;
6363
}}
6464
on:pointerdown={() => attack(selected_scale.notes[4])}
@@ -74,7 +74,7 @@
7474
<div class="grid col-span-4 grid-rows-1">
7575
<div>
7676
<img
77-
on:contextmenu={() => {
77+
on:contextmenu|preventDefault={() => {
7878
return false;
7979
}}
8080
on:pointerdown={() => attack(selected_scale.notes[1])}
@@ -87,7 +87,7 @@
8787
</div>
8888
<div>
8989
<img
90-
on:contextmenu={() => {
90+
on:contextmenu|preventDefault={() => {
9191
return false;
9292
}}
9393
on:pointerdown={() => attack(selected_scale.notes[2])}
@@ -100,7 +100,7 @@
100100
</div>
101101
<div>
102102
<img
103-
on:contextmenu={() => {
103+
on:contextmenu|preventDefault={() => {
104104
return false;
105105
}}
106106
on:pointerdown={() => attack(selected_scale.notes[5])}
@@ -116,7 +116,7 @@
116116
<div class="flex flex-row w-full">
117117
<div>
118118
<img
119-
on:contextmenu={() => {
119+
on:contextmenu|preventDefault={() => {
120120
return false;
121121
}}
122122
on:pointerdown={() => attack(selected_scale.notes[6])}
@@ -129,7 +129,7 @@
129129
</div>
130130
<div>
131131
<img
132-
on:contextmenu={() => {
132+
on:contextmenu|preventDefault={() => {
133133
return false;
134134
}}
135135
on:pointerdown={() => attack(selected_scale.notes[0])}

0 commit comments

Comments
 (0)