From 44b1f555f19fd059d47b68f4f2b7e8144af1a6b2 Mon Sep 17 00:00:00 2001 From: ilkin-overleaf <100852799+ilkin-overleaf@users.noreply.github.com> Date: Tue, 28 Feb 2023 11:37:38 +0200 Subject: [PATCH] Merge pull request #12001 from overleaf/ae-backspace Remove BackspaceHighjack GitOrigin-RevId: 7b20bff7d52b20152c437ba8bc773c4f37ad1fc3 --- .../js/ide/hotkeys/BackspaceHighjack.js | 20 ------------------- services/web/frontend/js/ide/hotkeys/index.js | 1 - 2 files changed, 21 deletions(-) delete mode 100644 services/web/frontend/js/ide/hotkeys/BackspaceHighjack.js diff --git a/services/web/frontend/js/ide/hotkeys/BackspaceHighjack.js b/services/web/frontend/js/ide/hotkeys/BackspaceHighjack.js deleted file mode 100644 index d9b792d966..0000000000 --- a/services/web/frontend/js/ide/hotkeys/BackspaceHighjack.js +++ /dev/null @@ -1,20 +0,0 @@ -/* eslint-disable - max-len, -*/ -// TODO: This file was created by bulk-decaffeinate. -// Fix any style issues and re-enable lint. -/* - * decaffeinate suggestions: - * DS102: Remove unnecessary code created because of implicit returns - * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md - */ -const rx = /INPUT|SELECT|TEXTAREA/i - -export default $(document).bind('keydown keypress', function (e) { - if (e.which === 8) { - // 8 == backspace - if (!rx.test(e.target.tagName) || e.target.disabled || e.target.readOnly) { - return e.preventDefault() - } - } -}) diff --git a/services/web/frontend/js/ide/hotkeys/index.js b/services/web/frontend/js/ide/hotkeys/index.js index 955d996a59..1034bb05e4 100644 --- a/services/web/frontend/js/ide/hotkeys/index.js +++ b/services/web/frontend/js/ide/hotkeys/index.js @@ -1,4 +1,3 @@ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. -import './BackspaceHighjack' import '../../features/hotkeys-modal/controllers/hotkeys-modal-controller'