2023-11-04 22:40:56 -04:00
|
|
|
export default {
|
|
|
|
addFormSubmit (context) {
|
|
|
|
context.el.addEventListener('keydown', (e) => {
|
|
|
|
if (e.ctrlKey && e.key === 'Enter') {
|
|
|
|
context.el.dispatchEvent(
|
|
|
|
new Event('submit', { bubbles: true, cancelable: true }))
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2024-02-23 22:31:51 -05:00
|
|
|
mounted () { this.addFormSubmit(this) }
|
2023-11-04 22:40:56 -04:00
|
|
|
}
|