Skip to content

Commit

Permalink
fix: moved prompt style fix from component to global style
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniosarro committed Feb 1, 2025
1 parent f2b7bc2 commit 9c79db8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/renderer/components/FtPrompt/FtPrompt.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</template>

<script setup>
import { nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
import { useId } from '../../composables/use-id-polyfill'
import store from '../../store/index'
Expand Down Expand Up @@ -121,16 +121,9 @@ onMounted(() => {
onBeforeUnmount(() => {
document.removeEventListener('keydown', handleEscape, true)
document.body.style.overflow = ''
nextTick(() => lastActiveElement?.focus())
})
watch(promptCard, (val) => {
if (val) {
document.body.style.overflow = 'hidden'
}
})
/**
* @param {number} index
*/
Expand Down
7 changes: 6 additions & 1 deletion src/renderer/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ body {
--logo-tertiary-color: var(--primary-text-color);
}


/*************** RULE TWEAKS ***************/

/* Default sidenav hover text color and primary input color not needed to be changed for most themes */
Expand Down Expand Up @@ -2004,3 +2003,9 @@ a:visited {
::-webkit-scrollbar-thumb:focus {
background: var(--scrollbar-color-hover);
}

/***** REMOVE MAIN SCROLLBAR WHEN PROMPT IS OPEN ******/

body:has(.app):has(.vue-portal-target):has(.prompt) {
overflow: hidden;
}

0 comments on commit 9c79db8

Please sign in to comment.