Skip to content

Commit 9cb913e

Browse files
committed
fix(QDrawer): Position when on iOS and QLayout is containerized
1 parent 4a2298a commit 9cb913e

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

docs/src/pages/layout/drawer.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ Since QDrawer needs a layout and QLayout by default manages the entire window, t
2727
By default, QDrawer has touch actions attached to it. If this interferes with your drawer content components, disable it by specifying the Boolean `no-swipe-close` property.
2828
:::
2929

30+
::: warning
31+
When QDrawer is set into overlay mode, **it will force it to go into fixed position**, regardless if QLayout's "view" prop is configured with "l/r" or "L/R". Also, **if on iOS platform and QLayout is containerized**, the fixed position will also be forced upon QDrawer due to platform limitations that cannot be overcome.
32+
:::
33+
3034
### Basic
3135

3236
<doc-example title="Basic" file="QDrawer/Basic" />

docs/src/pages/layout/layout.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ These settings are completely up to you to use as you'd like. You could even go
7272
<q-btn push color="red" icon-right="launch" label="Layout Builder" type="a" href="/layout-builder" target="_blank" rel="noopener noreferrer" />
7373

7474
::: warning
75-
It is important that you specify all sections of a QLayout, even if you don't use them. For example, even if you don't use footer or right side drawer, still specify them within your QLayout's `view` prop.
75+
* It is important that you specify all sections of a QLayout, even if you don't use them. For example, even if you don't use footer or right side drawer, still specify them within your QLayout's `view` prop.
76+
* When QDrawer is set into overlay mode, **it will force it to go into fixed position**, regardless if QLayout's "view" prop is configured with "l/r" or "L/R". Also, **if on iOS platform and QLayout is containerized**, the fixed position will also be forced upon QDrawer due to platform limitations that cannot be overcome.
7677
:::
7778

7879
### Containerized QLayout

ui/src/components/layout/QDrawer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ export default Vue.extend({
205205
fixed () {
206206
return this.overlay === true ||
207207
this.miniToOverlay === true ||
208-
this.layout.view.indexOf(this.rightSide ? 'R' : 'L') > -1
208+
this.layout.view.indexOf(this.rightSide ? 'R' : 'L') > -1 ||
209+
(this.$q.platform.is.ios && this.layout.container === true)
209210
},
210211

211212
onLayout () {

ui/src/components/layout/QLayout.styl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
.q-layout
22
width 100%
33

4-
&--containerized
5-
// https://github.com/quasarframework/quasar/issues/4127
6-
// Fixes scroll issues with containerized Layout inside Dialog on iOS
7-
position unset !important
8-
94
.q-layout-container
105
position relative
116
width 100%
@@ -170,3 +165,10 @@ body.q-ios-padding
170165
padding 16px
171166
@media (min-width $breakpoint-lg-min)
172167
padding 24px
168+
169+
body.platform-ios
170+
.q-layout--containerized
171+
// https://github.com/quasarframework/quasar/issues/4127
172+
// Fixes scroll issues with containerized Layout inside Dialog on iOS;
173+
// QDrawer needs to be forced into fixed position
174+
position unset !important

0 commit comments

Comments
 (0)