From e7e61cf6e496ad91d648aedb3ac9ff82ef6c6eeb Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Tue, 24 Oct 2017 18:35:50 +0200 Subject: [PATCH] Fixes broken cmd_enter in Firefox. Closes #96. --- dpaste/templates/dpaste/base.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dpaste/templates/dpaste/base.html b/dpaste/templates/dpaste/base.html index 2eeb903..9700140 100644 --- a/dpaste/templates/dpaste/base.html +++ b/dpaste/templates/dpaste/base.html @@ -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;