Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Fix bad keyboard handling assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed Jan 18, 2022
1 parent 2e6973c commit 9e7e4a8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/VAudioTrack/VWaveform.vue
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,17 @@ export default defineComponent({
default: () => ['timestamps', 'seek'],
},
},
emits: [
/**
* Emitted when the waveform receives mouse events for seeking,
* either single clicks on a specific part of the waveform,
* or a click and drag.
*
* Also emitted when the waveform receives arrow key or home/end
* keyboard events that also correspond to seeking.
*/
'seeked',
],
setup(props, { emit }) {
/* Utils */
Expand Down Expand Up @@ -439,7 +450,7 @@ export default defineComponent({
}
const willBeHandled = (event) =>
['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event)
['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)
const handleKeys = (event) => {
if (!willBeHandled(event)) return
Expand Down

0 comments on commit 9e7e4a8

Please sign in to comment.