Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const onKeypress = function (event: CustomEventInterface) {
if (!me.get('isFocus')) {
return
}
const originalEvent = event.originalEvent as KeyboardEvent
me.fire(
new Yox.Event('keypress.input', originalEvent)
)
}
const onKeydown = function (event: CustomEventInterface) {
if (!me.get('isFocus')) {
return
}
const originalEvent = event.originalEvent as KeyboardEvent
me.fire(
new Yox.Event('keydown.input', originalEvent)
)
if (originalEvent.keyCode === 13) {
me.fire('enter.input')
}
}
const onKeyup = function (event: CustomEventInterface) {
const onKeydown = function (event: CustomEventInterface) {
if (!me.get('isFocus')) {
return
}
const originalEvent = event.originalEvent as KeyboardEvent
me.fire(
new Yox.Event('keydown.input', originalEvent)
)
if (originalEvent.keyCode === 13) {
me.fire('enter.input')
}
}
const onKeyup = function (event: CustomEventInterface) {
const onKeypress = function (event: CustomEventInterface) {
if (!me.get('isFocus')) {
return
}
const originalEvent = event.originalEvent as KeyboardEvent
me.fire(
new Yox.Event('keypress.input', originalEvent)
)
}
const onKeyup = function (event: CustomEventInterface) {
if (!me.get('isFocus')) {
return
}
const originalEvent = event.originalEvent as KeyboardEvent
me.fire(
new Yox.Event('keyup.input', originalEvent)
)
}
const onKeypress = function (event: CustomEventInterface) {
const onKeyup = function (event: CustomEventInterface) {
if (!me.get('isFocus')) {
return
}
const originalEvent = event.originalEvent as KeyboardEvent
me.fire(
new Yox.Event('keyup.input', originalEvent)
)
}
const onKeypress = function (event: CustomEventInterface) {