mediacube-ui 0.1.422 → 0.1.424
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -698,8 +698,13 @@ export default {
|
|
|
698
698
|
const excluded_symbols = ['.', ',']
|
|
699
699
|
this.allowNegative && excluded_symbols.push('-')
|
|
700
700
|
const is_excluded_symbol = excluded_symbols.includes(e.key)
|
|
701
|
+
const is_copy = e.metaKey && e.key === 'c'
|
|
702
|
+
const is_paste = e.metaKey && e.key === 'v'
|
|
703
|
+
const is_select = e.metaKey && e.key === 'a'
|
|
704
|
+
const is_command = is_paste || is_copy || is_select
|
|
705
|
+
const is_allowed_symbol = e.key?.match(/Arrow|Backspace|\.,/)
|
|
701
706
|
|
|
702
|
-
if ((isNaN(+e.key) && !
|
|
707
|
+
if ((isNaN(+e.key) && !is_allowed_symbol && !is_excluded_symbol && !is_command) || is_space) {
|
|
703
708
|
e.preventDefault()
|
|
704
709
|
}
|
|
705
710
|
|