mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-23 10:42:00 +00:00
Added the old backspace highjack back in.
It uses jquery and works well. There may be an angular way todo this but the jquery way seemed cleanest to me.
This commit is contained in:
parent
f0f997ed6c
commit
9c2cca1372
2 changed files with 10 additions and 0 deletions
|
@ -0,0 +1,9 @@
|
|||
define [
|
||||
], () ->
|
||||
rx = /INPUT|SELECT|TEXTAREA/i
|
||||
|
||||
$(document).bind "keydown keypress", (e)->
|
||||
if e.which == 8
|
||||
# 8 == backspace
|
||||
if !rx.test(e.target.tagName) || e.target.disabled || e.target.readOnly
|
||||
e.preventDefault()
|
|
@ -1,3 +1,4 @@
|
|||
define [
|
||||
"ide/hotkeys/BackspaceHighjack"
|
||||
"ide/hotkeys/controllers/HotkeysController"
|
||||
], () ->
|
Loading…
Reference in a new issue