Просмотр исходного кода

Merge pull request #12001 from overleaf/ae-backspace

Remove BackspaceHighjack

GitOrigin-RevId: 7b20bff7d52b20152c437ba8bc773c4f37ad1fc3
ilkin-overleaf 3 лет назад
Родитель
Сommit
44b1f555f1

+ 0 - 20
services/web/frontend/js/ide/hotkeys/BackspaceHighjack.js

@@ -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()
-    }
-  }
-})

+ 0 - 1
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'