From 87f1881b429877a740ea84a8e783ad4103248289 Mon Sep 17 00:00:00 2001 From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com> Date: Thu, 25 Mar 2021 15:47:49 +0000 Subject: [PATCH] fix: list item interactions on share --- frontend/src/components/prompts/Prompts.vue | 6 ++++++ frontend/src/css/_share.css | 2 +- frontend/src/css/listing.css | 1 + frontend/src/views/Files.vue | 9 --------- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/prompts/Prompts.vue b/frontend/src/components/prompts/Prompts.vue index 3d3b2eda..36cb0349 100644 --- a/frontend/src/components/prompts/Prompts.vue +++ b/frontend/src/components/prompts/Prompts.vue @@ -56,6 +56,12 @@ export default { let prompt = this.$refs.currentComponent; + // Esc! + if (event.keyCode === 27) { + event.stopImmediatePropagation(); + this.$store.commit("closeHovers"); + } + // Enter if (event.keyCode == 13) { switch (this.show) { diff --git a/frontend/src/css/_share.css b/frontend/src/css/_share.css index a5f2d35f..6d1c2296 100644 --- a/frontend/src/css/_share.css +++ b/frontend/src/css/_share.css @@ -34,7 +34,7 @@ } .share__box__info { - flex: 1 1 auto; + flex: 1 1 18em; } .share__box__element { diff --git a/frontend/src/css/listing.css b/frontend/src/css/listing.css index 7abf14bb..8506df7a 100644 --- a/frontend/src/css/listing.css +++ b/frontend/src/css/listing.css @@ -25,6 +25,7 @@ transition: .1s ease background, .1s ease opacity; align-items: center; cursor: pointer; + user-select: none; } #listing .item div:last-of-type { diff --git a/frontend/src/views/Files.vue b/frontend/src/views/Files.vue index eba7acab..781b0edb 100644 --- a/frontend/src/views/Files.vue +++ b/frontend/src/views/Files.vue @@ -124,15 +124,6 @@ export default { } }, keyEvent(event) { - if (this.show !== null) { - // Esc! - if (event.keyCode === 27) { - this.$store.commit("closeHovers"); - } - - return; - } - // F1! if (event.keyCode === 112) { event.preventDefault();