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] v0.15 Scrollbar Appears Even if the Window Does Not Overflow

    Help
    3
    9
    2493
    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.
    • S
      snowdrop last edited by snowdrop

      Good day. I just noticed that after I upgraded from v0.14.9 to v.0.15, a scrollbar now appears even if the window does not overflow. The scrollbar disappears though when a dialog/modal is displayed. Here are the screenshots:

      0_1520236952733_Screenshot_20180305_155157.png

      1_1520236952734_Screenshot_20180305_155248.png

      I’ve tried researching but still can’t find any solution. The layout looks like this:

      <q-layout view="hHh Lpr lFf">
          <dashboard-header></dashboard-header>
          <dashboard-left-drawer></dashboard-left-drawer>
          <dashboard-right-drawer></dashboard-right-drawer>
      
          <q-page-container>
              <transition
              appear
              enter-active-class="animated fadeIn"
              leave-active-class="animated fadeOut"
              mode="out-in"
              :duration="200">
                  <router-view/>
              </transition>
          </q-page-container>
      </q-layout>
      

      Any idea what might be causing this?

      1 Reply Last reply Reply Quote 0
      • S
        Sweetyy last edited by

        Hi @snowdrop ,

        When you have no modal open, isn’t it because of a padding or margin in your container that you have this scrollbar ?

        But when you open a modal it’s totally normal the scrollbar disappears because of this CSS wich is automatically added to the body.

        body.with-modal {
            overflow: hidden !important;
        }
        

        The modal is in position fixed and over everything with a z-index and so no need to have a scrollbar on the body because it’s the content of the modal itself that is scrollable.

        Hope it helps !

        1 Reply Last reply Reply Quote 1
        • S
          snowdrop last edited by

          @Sweetyy I’m not sure about that but I’ve tried removing all other container and what letting one of the components stay (so that it won’t be completely blank page) but the scroll still appears. One of the container has it’s bottom portion on half of the page already to determine if it still overflows, but to no avail. Seems that any children of q-layout has scrollbar on it.

          1 Reply Last reply Reply Quote 0
          • S
            snowdrop last edited by

            @Sweetyy I think what you said is true. What I noticed is even if the page with a padding/margin that might cause it to scroll is destroyed, the scroll still appears in some of the pages. At least I know this is not a problem with the quasar template itself. Thanks!!

            1 Reply Last reply Reply Quote 0
            • S
              Sweetyy last edited by

              @snowdrop you’re welcome ! I’m glad it helped you 🙂

              1 Reply Last reply Reply Quote 0
              • S
                snowdrop last edited by snowdrop

                @Sweetyy I now discovered the true culprit. seems that the quasar template adds a min-height: 100vh; on both the <body></body> and <q-layout></q-layout>. Adding a style="min-height: 0px" on both the tags fixed the problem, though I don’t know the side effect of overriding the min-height. 🙂

                1 Reply Last reply Reply Quote 0
                • S
                  Sweetyy last edited by

                  @snowdrop well i never had to edit this property. Let us know if you get any trouble in the interface because of that 🙂

                  1 Reply Last reply Reply Quote 0
                  • S
                    snowdrop last edited by

                    @Sweetyy cool. thanks!

                    1 Reply Last reply Reply Quote 0
                    • S
                      stuartcusack last edited by stuartcusack

                      I can confirm a similar fix to snowdrop’s. I get a vertical scrollbar when using a html table that only overlaps horizontally within a q-page. I think this is something to do with Quasar’s implementation of 100vh and scrollbar heights, and I’ve only seen it happen when using tables.

                      Problem is solved if I wrap my tables in overflow divs:

                      <div style="position: relative; overflow: auto; max-width: 100%; ">
                      	<table>// Table Content</table>
                      </div>
                      

                      By the way I tried all kinds of solutions by altering the q-layouts and q-pages styles but I ran into trouble with transitions and other things. Best off not messing with the quasar layout elements too much.

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