diff --git a/resources/js/components/comparaison.vue b/resources/js/components/comparaison.vue index 05010f3..2d2004e 100644 --- a/resources/js/components/comparaison.vue +++ b/resources/js/components/comparaison.vue @@ -43,6 +43,7 @@ const time = ref({ }); function resetFields() { + emit('clear-history'); title.value = '' artist.value.label = 'Artist ?' diff --git a/resources/js/components/search-bar.vue b/resources/js/components/search-bar.vue index b5af554..7264f5d 100644 --- a/resources/js/components/search-bar.vue +++ b/resources/js/components/search-bar.vue @@ -44,7 +44,8 @@ async function sendProposition(songId) { v-on:keyup.enter="songs.length > 0 ? sendProposition(songs[focusIndex].id) : null" v-on:keydown.arrow-up="focusIndex > 0 ? focusIndex-- : null" v-on:keydown.arrow-down="focusIndex < songs.length - 1 ? focusIndex++ : null" class="neon-effect-cyan-off" - type="text" @focusout="songs = [], focusIndex = -1" placeholder="Taper le nom d'une musique"> + v-on:keydown.escape="songs = []" + type="text" @focusout="focusIndex = -1" placeholder="Taper le nom d'une musique">