No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    [SOLVED] Prevent popup proxy from closing when clicking outside

    Framework
    3
    8
    1430
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ssuess
      ssuess last edited by ssuess

      Hi I am using a calendar popup similar to the one shown here: https://quasar.dev/vue-components/date#With-QInput

      but I also have an ok button that triggers a method, and I don’t want users to be able to click outside the calendar to be able to dismiss it. Is there a way to prevent popup proxy from recognizing a click outside and only have it respond to my ok or cancel buttons?

      1 Reply Last reply Reply Quote 0
      • Hawkeye64
        Hawkeye64 last edited by

        @ssuess use the persistent pass-through (QMenu/QDialog) property

        1 Reply Last reply Reply Quote 0
        • ssuess
          ssuess last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • ssuess
            ssuess last edited by ssuess

            tried this, did not work:

            <q-popup-proxy persistent>
                        <q-date minimal flat v-model="startdate" mask="YYYY/MM/DD" :options="drangeOptions"/>
                          <div class="row items-center justify-end" style="margin-top:-20px;">
                            <q-btn label="Cancel" color="secondary" flat v-close-popup />
                            <q-btn label="OK" color="secondary" @click="setSlider(1)" flat v-close-popup />
                          </div>
                      </q-popup-proxy>
            
            metalsadman 1 Reply Last reply Reply Quote 0
            • metalsadman
              metalsadman @ssuess last edited by metalsadman

              @ssuess actually, provide a codepen. Tried it on a codepen and persistent works just fine.

              1 Reply Last reply Reply Quote 0
              • ssuess
                ssuess last edited by

                Well shit, when I put my exact code fragment into a codepen, it works (to prevent closure when clicking outside the calendar). But in my app, it does NOT. Still trying to figure out why that would be the case…

                metalsadman 1 Reply Last reply Reply Quote 0
                • metalsadman
                  metalsadman @ssuess last edited by metalsadman

                  @ssuess maybe youre version is not updated, not sure when the props was added, but yeah worth checking your current quasar version.

                  1 Reply Last reply Reply Quote 0
                  • ssuess
                    ssuess last edited by

                    I finally got it working after completely blowing away the cache in my browser’s settings. Force reload was not working for some reason, even though usually a force reload (shift-reload) works when there is cached weirdness. Now it is finally working. Thanks for your help.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post