numeric-keyboard
numeric-keyboard copied to clipboard
[Vue] Unable to fire `press` event from NumericKeyboard
Here is my setup. I am using vue@^2.6.11
<template>
<div class='dialog fixed-bottom'>
<v-numeric-keyboard :layout='PasswordLayout' @press='press' />
</div>
</template>
<script lang='ts'>
import Vue from 'vue';
import { NumericKeyboard, Keys } from 'numeric-keyboard/dist/numeric_keyboard.vue.js';
const PasswordLayout = <Same as in demo folder>
export default Vue.extend({
components: { 'v-numeric-keyboard': NumericKeyboard },
data() { return { PasswordLayout, password: '' }},
methods: {
press(key) {
console.log(key); // Never Fired.
}
}
});
</script>
Thank you. I can confirm the problem.
Thing is: The Event is fired only on my mobile. Not on the Desktop.
seems that https://github.com/viclm/numeric-keyboard/blob/a58fb7216fe086696edce13f040005c49ddf11d2/dist/numeric_keyboard.vue.js#L1509
this only listens to touchscreen inputs. click should be added on the eventlisteners