mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
9 lines
No EOL
229 B
CoffeeScript
9 lines
No EOL
229 B
CoffeeScript
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() |