Prevent q-toolbar from ever hiding?
-
On ios, when scrolling up, the q-toolbar element will hide (and then show again when scrolling down). Is there a way to prevent this from ever hiding, to keep it always fixed at the top of the view?
-
Could you provide an image or video of that behavior?
Are you using version 0.14? I suspect, you do not mean the Toolbars, but are referring to the Layout Header.
The stickiness of the Layout can be set by using theview
prop, you can play with it here:
http://quasar-framework.org/quasar-play/apple/index.html#/showcase/layout/play-with-layout -
Thanks I mean the toolbar at the top of the layout, yes. On the web, it is sticky (by that I mean it does not disappear when scrolling), but when I create a cordova wrapper for the same build, on my iphone the layout toolbar top disappears when scrolling, which I don’t want. I want the toolbar at the top of the layout to stay always at the top of the screen, always taking the same amount of space.
-
I noticed that if I add the
reveal
property, the web will get the same behavior I DON’T WANT (which is happening on the iphone all the time) -
So if you use Chrome Debug and in the responsive tools, set the Device to iOS this does not happen?
If so, it seems like it is a bug, in which case you should post it to the GitHub repo. -
Yeah, in chrome tools setting device iphone this does not happen. Only on an actual iphone itself after the Cordova build. I will report it as a bug (but is it a quasar bug or a cordova bug?)
-
Hard to tell, if it is Quasar or Cordova specific.
Maybe @rstoenescu can have a look on this. -
@ssuess can you post your layout code? I had similar experience with v0.14 initially setting my view property to the below resolved it.
<q-layout ref="layout" view="lHh Lpr lFf">
-
Sure here it is. Like I said before, works just fine in web browser, but not on iPhone directly.
<q-layout ref="layout" view="lHh Lpr fff" :left-class="{'bg-grey-2': true}" >
-
Using WKwebview solves this problem.
-
@ssuess I have this same issue. It only happens on iPhone 6 and above when running the Cordova build on hardware or emulated. Doesn’t happen on my iPhone 5.
What do you mean by “WKwebview solves this problem”.
-
I mean that if you are building this as a Cordova app, you should use a plugin that enables WKWebView instead of the built in UIWebView. It solves this problem, among others. You can find such a plugin here: https://github.com/ionic-team/cordova-plugin-ionic-webview
Please note that there are a couple of integration issues which I discuss here (among other places): http://forum.quasar-framework.org/topic/93/custom-webview-for-ios-devices/7
BUT given the above, (and if you are building for Cordova) it is TOTALLY worth it, because the performance blows the default UIWebview out of the water.