Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue 2 router scrollBehavior not working for layout views #161

Closed
laurentpayot opened this issue Nov 3, 2016 · 15 comments
Closed

Vue 2 router scrollBehavior not working for layout views #161

laurentpayot opened this issue Nov 3, 2016 · 15 comments

Comments

@laurentpayot
Copy link
Contributor

laurentpayot commented Nov 3, 2016

In history mode, Vue 2 router scrollBehavior is only working for "top" components not using layout.

@rstoenescu should I open an issue about scrollBehavior and nested routes directly on vue-router or do you think it's on the Quasar side?

@rstoenescu
Copy link
Member

I will make a statement soon about Vue Router's "history" mode. There are some technical limitations that cannot be currently overcome, the most important one being you can't build with history mode for Cordova.

@rstoenescu
Copy link
Member

You will understand why. It's logical.

@rstoenescu
Copy link
Member

You will be able to use history mode for websites only though. I'll write a directive for the scroll behavior which will work in both history and hash mode.

@laurentpayot
Copy link
Contributor Author

Thanks @rstoenescu, cordova apps are not my main concern. Specially with progressive apps coming… 😉

@rstoenescu
Copy link
Member

Then you'll be good ;) There's a progressive app starter kit on the todo list for Quasar.

@laurentpayot
Copy link
Contributor Author

I noticed that. Can't wait! 😄

@rstoenescu
Copy link
Member

Will update the default starter kit today ("v2") with some improvements for when using history mode. Make sure you update Quasar CLI too to generate a project and check it out.

@laurentpayot
Copy link
Contributor Author

Will do. Will the changes in the template be easy to see so I can just modify my current project or is a start from scratch + pasting code from current project a better option?

@rstoenescu
Copy link
Member

If you haven't touched the /build and /config folders you'll be able to simply overwrite them with the new ones rather than checking the commit and applying same changes.

@laurentpayot
Copy link
Contributor Author

Great!

@rstoenescu
Copy link
Member

Check it now. Commit: quasarframework/quasar-template-default@6d3980f

@laurentpayot
Copy link
Contributor Author

laurentpayot commented Nov 4, 2016

I overwrote /build and /config folders, and also added the opn dependency.

Don't you think this issue should be re-opened, waiting for the directive? If this is not a bug, at least with a "feature" flag…

@rstoenescu
Copy link
Member

Not reopening as this will duplicate: #72

@laurentpayot
Copy link
Contributor Author

Ah I didn't know #72 . Ok then.

@Terumi
Copy link

Terumi commented Oct 17, 2017

I found this that works just fine
https://www.npmjs.com/package/vue-scroll-behavior

The only issue with is that you cannot use transitions as the page jump immediately to the stored position.

I hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants