Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Prevent obstruction of audio player controls (#2019)

Dhruv Bhanushali4cf4ae090b18
diff --git a/src/components/VGlobalAudioSection/VGlobalAudioSection.vue b/src/components/VGlobalAudioSection/VGlobalAudioSection.vue
index 91ebc6081..7fe37f3e6 100644
--- a/src/components/VGlobalAudioSection/VGlobalAudioSection.vue
+++ b/src/components/VGlobalAudioSection/VGlobalAudioSection.vue
@@ -1,9 +1,9 @@
<template>
- <div class="global-audio sticky bottom-0 sm:hidden">
+ <div class="global-audio sticky bottom-0 z-global-audio sm:hidden">
<VGlobalAudioTrack v-if="audio" :audio="audio" />
<VIconButton
v-if="audio"
- class="absolute top-0 z-20 border-none ltr:right-0 rtl:left-0"
+ class="absolute top-0 z-10 border-none ltr:right-0 rtl:left-0"
size="large"
:icon-props="{ iconPath: icons.closeIcon }"
@click="handleClose"
diff --git a/src/components/VSnackbar.vue b/src/components/VSnackbar.vue
index c138e76c4..8aa8303bd 100644
--- a/src/components/VSnackbar.vue
+++ b/src/components/VSnackbar.vue
@@ -38,7 +38,7 @@ export default defineComponent({
<style module>
.snackbar {
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.3);
- @apply fixed bottom-4 z-10 rounded-sm bg-black text-white transition-[opacity,transform] duration-500 ltr:left-4 rtl:right-4 motion-reduce:transition-opacity;
+ @apply fixed bottom-4 z-snackbar rounded-sm bg-black text-white transition-[opacity,transform] duration-500 ltr:left-4 rtl:right-4 motion-reduce:transition-opacity;
}
.large {
diff --git a/src/constants/z-indices.js b/src/constants/z-indices.js
index c13942083..fc0a3f5dc 100644
--- a/src/constants/z-indices.js
+++ b/src/constants/z-indices.js
@@ -17,6 +17,8 @@ const Z_INDICES = Object.freeze(
50: 50,
// Named indices
popover: 50,
+ snackbar: 10,
+ 'global-audio': 20,
})
)