Skip to content

Commit 82c6310

Browse files
committed
Prevent contextmenu handlers from piling up
1 parent 6d5f99a commit 82c6310

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/lightbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
if (event.which === 3) {
174174
self.$nav.css('pointer-events', 'none');
175175

176-
self.$lightbox.on('contextmenu', function() {
176+
self.$lightbox.one('contextmenu', function() {
177177
setTimeout(function() {
178178
this.$nav.css('pointer-events', 'auto');
179179
}.bind(self), 0)

0 commit comments

Comments
 (0)