Fixes broken cmd_enter in Firefox. Closes #96.

This commit is contained in:
Martin Mahner 2017-10-24 18:35:50 +02:00 committed by GitHub
parent 5ab0f03443
commit e7e61cf6e4

View file

@ -34,8 +34,7 @@
let se = document.querySelector(".superenter textarea");
if (se !== null) {
se.onkeydown = function (e) {
let metaKey = navigator.appVersion.indexOf("Win") !== -1 ? e.ctrlKey
: event.metaKey;
let metaKey = navigator.appVersion.indexOf("Win") !== -1 ? e.ctrlKey : e.metaKey;
if (e.keyCode === 13 && metaKey) {
document.querySelector(".snippet-form").submit();
return false;