question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Full height QTabPanels in a QLayout

See original GitHub issue

Is your feature request related to a problem? Please describe.

Specially when using swipeable q-tab-panels containing q-tab-panel, there is the issue that the q-tab-panel(s) don’t fill out the entire height of the q-page, but shrink in height to the content inside the panel. This makes the area below the content unswipeable.

Also, as a second negative effect, the content inside the q-tab-panel can’t use height:100% in its elements, for example if you want to specify the height of 100% for an image which should resize to use the full height of the q-page (even though this 100% height has an issue because it will refer to the full height of the q-tab-panel, so when mixed with other content the bottom will be cut off, but I think that this is generally an issue with HTML)

Using the helper class full-height does not seem to work.

Describe the solution you’d like

There should be an option in q-tab-panels to enforce it to consume the full height of its parent. Or it should respect the helper class full-height if applied to q-tab-panels.

Describe alternatives you’ve considered

The problem seems to reside in the fact that the parent container q-page does not set its height attribute, so that the browser won’t compute %-heights in the child elements. It only sets min-height to a pixel value which corresponds to the exact height necessary in the q-page for it to fill the q-page-container.

Setting q-page’s height to 1px (which will then be set to min-height automatically) will give q-tab-panels a reference to work when it gets applied a height of 100%, this will then expand the panel’s height to the full height available in the q-page.

I am not sure if this alternative is actually the correct approach to solving that issue, and if it is, maybe it should be included in the documentation of q-tab-panels. Else height should be applied programmatically by the framework in parallel to min-height if requested. Then setting height:100% on q-tab-panels would work as expected.

Additional context

The following example contains a q-toggle which will toggle the behavior on and off. The panels are swipeable, only the colored area reacts to mouse events for swipe requests. Chrome and Firefox behave identically.

https://codepen.io/danielfaust/pen/abbqmrQ?editors=1010

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
smolinaricommented, Nov 4, 2019

Is this what you are looking for?

https://codepen.io/smolinari/pen/zYYRoyg?editors=1010

Notice only the added “row” entry in the q-page class.

Scott

1reaction
smolinaricommented, Nov 4, 2019

@danielfaust - I’m far, far from a CSS expert. But, this solution is dealing with the CSS (and Quasar’s) flexbox system. And knowing that often just adding “row” to a div means the Quasar’s flexbox system kicks in, the height issue went away after that. Don’t ask me why. 😁

https://quasar.dev/layout/grid/introduction-to-flexbox

Scott

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make a Quasar q-page-container child use full height ...
The problem is that the container does not fully expand to cover the entire height (unlike the drawer, which, using absolute positioning, does)....
Read more >
How to prevent scrolling on layout page-container?
I'm using q-layout with a header and 2 drawers. The main page container has a tab-bar, and each tab panel should take care...
Read more >
Quasar Framework Upgrade - HackMD
Check documentation for full list of Quasar variables // It's highly recommended to change the default colors // to match your app's branding....
Read more >
Tab Panels - Quasar Framework
The QTabPanel Vue component is a way of displaying more information using less window real ... Equivalent to using Vue's native max prop...
Read more >
Layout Management | Qt Widgets 6.4.1 - Qt Documentation
These classes inherit from QLayout, which in turn derives from QObject (not QWidget). ... see the Qt Quarterly article Trading Height for Width....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found