From df6beeaa05ff0396bc4d3f0aacca415d743b9b2a Mon Sep 17 00:00:00 2001 From: FlamedDogo99 <96555444+FlamedDogo99@users.noreply.github.com> Date: Thu, 6 Jun 2024 15:33:31 -0600 Subject: [PATCH] Fixed backspace crash --- eaglermobile.user.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/eaglermobile.user.js b/eaglermobile.user.js index 43ac3bd..2ef3f6c 100644 --- a/eaglermobile.user.js +++ b/eaglermobile.user.js @@ -6,7 +6,7 @@ // @downloadURL https://raw.githubusercontent.com/FlamedDogo99/EaglerMobile/main/eaglermobile.user.js // @license Apache License 2.0 - http://www.apache.org/licenses/ // @match https://eaglercraft.com/mc/* -// @version 2.15 +// @version 2.16 // @updateURL https://raw.githubusercontent.com/FlamedDogo99/EaglerMobile/main/eaglermobile.user.js // @run-at document-start // ==/UserScript== @@ -373,12 +373,11 @@ function insertCanvasElements() { hiddenInput.style.cssText = "position:absolute;top: 0vh; margin: auto; left: 8vh; right:0vh; width: 8vh; height: 8vh;font-size:20px;z-index:-10;color: transparent;text-shadow: 0 0 0 black;"; hiddenInput.value = " " //Allows delete to be detected before input is changed hiddenInput.addEventListener("input", function hiddenInputHandler(e) { - let inputData = e.data.charAt(0) + let inputData = e.data ? "delete" // backspace makes null window.lastKey = inputData hiddenInput.value = " "; // We need a character to detect deleting if(window.keyboardFix) { if(e.inputType == 'insertText') { - let inputData = e.data.charAt(0); let isShift = (inputData.toLowerCase() != inputData); if(isShift) { keyEvent("shift", "keydown")