Issue with electron/vuejs - uikit modal not taking up full screen height when nested within sub components

Can anyone explain why the modal appears with a dark background that doesn't cover the top and bottom when it's placed within a subsection of the larger code?

https://i.sstatic.net/SIOw7.png

Modal code Modal.vue

<template>
    <!-- This is the modal -->
    <div id="my-id" uk-modal>
        <div class="uk-modal-dialog uk-modal-body">
            <h2 class="uk-modal-title">Add Group</h2>
            <div class="uk-modal-body">
                <div>
                    Name:
                </div>
                <input type="text" />
            </div>
            <div class="uk-modal-footer">
                <div class="uk-float-right">
                    <button class="uk-modal-close" type="button">Ok</button>
                    <button class="uk-modal-close" type="button">Cancel</button>
                </div>
            </div>
        </div>
    </div>
</template>

This is where I'm placing it Sidebar.html

<section ref="wrapper">
    <div>
        <button v-on:click="update_files">Refresh</button>
        <button v-on:click="select_root">Select folder</button>
    </div>
    <article v-for="(folder, index) in folders">
        <header>{{ folder }}</header>
        <div>
            <button v-on:click="add(folder)">Add</button>
        </div>
        <ul>
            <li v-for="(file, index) in files[folder]" v-bind:data-folder="folder" v-on:click="load_file({folder, file})">
                {{ file }}
            </li>
        </ul>
    </article>

    <!-- This is a button toggling the modal -->
    <button uk-toggle="target: #my-id" type="button">Open modal</button>
    <Modal /> 
</section>

The modal is included using <Modal />

The Sidebar is a part of the App structure defined in App.html

<div id="app">
    <template v-if="store.state.General.root">
        <aside id="sidebar">
            <sidebar/>
        </aside>
        <main>
            <writing/>
        </main>
    </template>
    <div id='select_folder' v-else>
        <div>
            <div>
                Select a folder to begin
            </div>
            <button v-on:click="select_root">Select folder</button>
        </div>
    </div>

    <!-- <Modal /> -->
</div>

You can access the source code for this project (on the dev branch) at: https://github.com/FunnyB0y/forgit-me-not

Answer №1

The size of the modal is intentionally designed this way. It will only be as large as its content and padding. To make it fill the entire window, set .uk-open>.uk-modal-dialog to have a height: 100vh, but you may need to adjust inner padding to avoid a scroll bar.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Connecting a specific entry in a data table with a corresponding web address

I have been working on a vue component that utilizes vue-tables-2. You can find the functioning example here. My goal is to link the edit href url to the entire row rather than just the edit cell. I attempted to achieve this using vanilla javascript by a ...

Highlight the phrase "figure x" within the paragraph to emphasize its importance

I want to emphasize figure 1, figure2, ...all the way up to figure 111. I am limited to making changes in HTML and CSS only, without using JavaScript or jQuery. Is there a different method than just inserting <strong> in the HTML? In CSS, we have : ...

Tips for creating a website loading screen that allows users to fully immerse themselves in the experience

I am looking to improve the visibility of the loading screen that I have created. Ideally, it should last around 3-5 seconds using JQuery, as it is already in use on the website. Below is the code snippet: Additionally, I am not very familiar with JQuery, ...

What could be causing my grid-area properties to not take effect?

I'm attempting to create a basic structure with a header in the top row, menu and content in the middle row, and footer at the bottom. Here is what I have so far: body { color: white; } .container { background: cyan; display: grid; ...

What separates an unregistered HTML Custom Element from a registered one?

If I forget to register a custom element, I can still: customize the unregistered element using CSS attach events to the unregistered element using JS For example: // REGISTER <my-custom-element-1> class MyRegisteredCustomElement1 extends HTMLEl ...

Issue with Vue-gtag @legacy query not retrieving customer identification ID

Currently utilizing Vue2, I opted for vue-gtag@legacy as it's tailored for compatibility with version 2 of VueJS. Here is the setup in main.ts plugin: import VueGtagPlugin from "vue-gtag"; Vue.use(VueGtagPlugin, { config: { id: "G-MY ...

Sort Messages By Date Created

While using Vue, I encountered a general JavaScript question. I am fetching cat messages from an API for a chat interface. The initial call returns an array of objects where each object represents a chat message: data: [ {id: 1, created_at: "2022-05 ...

Leveraging the HTML Select element for language switching on a diverse website with multiple languages

Prior to this, I had a simple website where users could switch between English and Dutch by clicking on a hyperlink. I had separate files, de.php and en.php, with language arrays like this: de.php <?php $lang = array( "title" => &quo ...

Access your own data, shared data, or designated data with Firebase rules

Seeking guidance on implementing firebase rules and queries for Firestore in a Vue.js application. Requirement: User must be authenticated User can read/write their own data entries User can read data with "visibility" field set to "public" User can rea ...

Discover the method of extracting parameters from an event in Vuetify Vue.js

I am currently delving into the world of Vuetify and Vue.js, and I have a question regarding retrieving parameters when clicking on my treeview: For example, in the Chrome console with the Vue extension installed, I see: vue event update:active This pro ...

Strange occurrences of radio buttons in AngularJS

When working with radio buttons, I noticed a strange behavior that I wanted to share. My goal was to have Radio Button 1 selected if the array is undefined, and Radio Button 2 selected when the array is defined. In the initial state, the array is indeed ...

Update the checkboxes' appearance to be consistent with the rest of the form

I am utilizing the login form from a Fluent Kit framework, positioned third on the right in the example, specifically the dark one. There is a minor detail that I would like to modify but unsure how: the checkbox input, when checked, defaults to the prima ...

Set the dropdown item as selected using AngularJS

I have created a demo of an AngularJS dropdown menu, and it's working perfectly. Now, I want to make the selected item appear active. I'm not sure how to achieve this. Can anyone please assist me? I am using the Angular-Dropdown.js library. Here ...

Continuous animation for a sequence of overlapping images with smooth transitions

Currently, I am in the process of developing a JavaScript script that will cycle through a series of images within the same <div>. The goal is to create a seamless animation effect with the image transitions. Although the images are cycling through, ...

Converting HTML to PHP: A step-by-step guide

To retrieve the next available ID, which serves as the primary key in the table, I need to convert from HTML to PHP within the value attribute of an input tag. Unfortunately, this approach doesn't work as intended. The PHP code seems to interfere wit ...

Is it possible to remove the parent element using CSS?

Is there a method to remove the parent element while retaining the current element? Take a look at my example here: <div id="parent"> <div id="child"> <span>some text</span> </div> </div> div { ...

Initiate the selection of all other buttons with a single click using Bootstrap

My objective is to implement a feature where clicking on one button will automatically select all other buttons associated with it. https://i.sstatic.net/Ela05.png For example, when I click on "book1", I want it to also select buttons 1, 2, 3, 4, and 5 t ...

Can someone assist me with positioning the image card to overlay the top border of the card using bootstrap, or is it only achievable with CSS?

https://i.sstatic.net/Ef69i.png Is there a way to use Bootstrap to position the image card to overlay the top border of the card without using custom CSS? I've attempted to achieve this with the following custom CSS: style="margin: -50px 70px;& ...

What is the best way to address a NULL value within a VueJS filter?

This piece of code demonstrates a working filter filteredItems() { return this.items.filter(item => item.name.toLowerCase().indexOf(this.search.toLowerCase()) > -1) } However, my attempt to filter on a second column ...

The text for the Django link is too verbose

When working on my Django app, I encountered an issue in the detail view where links to attached files in a Post are displayed. The problem arises when the link is too long and extends beyond the border. Is there a way to only show a portion of the link if ...