Merge pull request #12001 from overleaf/ae-backspace

Remove BackspaceHighjack

GitOrigin-RevId: 7b20bff7d52b20152c437ba8bc773c4f37ad1fc3
This commit is contained in:
ilkin-overleaf 2023-02-28 11:37:38 +02:00 committed by Copybot
parent fed5ad87a1
commit 44b1f555f1
2 changed files with 0 additions and 21 deletions

View file

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

View file

@ -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'