Prevent right click context menu

Chrome (again) makes a context menu when a touch pointer is
held. We'll have none of that
This commit is contained in:
Adam Goldsmith 2017-09-21 12:00:50 -04:00
parent fc23e7f2ef
commit 07648ce1c5

View File

@ -15,6 +15,8 @@ window.addEventListener('load', () => {
deckName = document.querySelector('#card-container').getAttribute("data-deckName"); deckName = document.querySelector('#card-container').getAttribute("data-deckName");
xhr.open("GET", "/deck/" + deckName + "/deck.json"); xhr.open("GET", "/deck/" + deckName + "/deck.json");
xhr.send(); xhr.send();
window.addEventListener("contextmenu", event => event.preventDefault());
}); });
let cardInteract = interact('.card', {ignoreFrom: '.in-list'}) let cardInteract = interact('.card', {ignoreFrom: '.in-list'})