ctrl alt shift keys filter
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3f77fbd93d
commit
e83f796413
@ -6,7 +6,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
ac = undefined,
|
||||
last = undefined
|
||||
document.getElementById('instance').addEventListener('keydown', function (event) {
|
||||
if (event.key && ((event.key.length === 1 && /[a-z0-9.\-*:]/i.test(event.key)) || (event.key === 'Backspace' && event.target.value !== ''))) {
|
||||
if (event.key && !event.ctrlKey && !event.altKey && !event.shiftKey) {
|
||||
if ((event.key.length === 1 && /[a-z0-9.\-*:]/i.test(event.key)) || (event.key === 'Backspace' && event.target.value !== '')) {
|
||||
last = event.target.value
|
||||
} else if (event.key === 'Backspace' && event.target.value === '') {
|
||||
last = ''
|
||||
@ -14,14 +15,23 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
}
|
||||
} else {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
}
|
||||
})
|
||||
document.getElementById('instance').addEventListener('keyup', function (event) {
|
||||
if (event.key && ((event.key.length === 1 && /[a-z0-9.\-*:]/i.test(event.key)) || (event.key === 'Backspace' && last !== ''))) {
|
||||
if (event.key && !event.ctrlKey && !event.altKey && !event.shiftKey) {
|
||||
if ((event.key.length === 1 && /[a-z0-9.\-*:]/i.test(event.key)) || (event.key === 'Backspace' && event.target.value !== '')) {
|
||||
keypress(event, event.target.value)
|
||||
} else {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
}
|
||||
} else {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
}
|
||||
})
|
||||
var modal = document.getElementById('modal'),
|
||||
closemodal = document.getElementById('closemodal'),
|
||||
|
Loading…
Reference in New Issue
Block a user