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

Doesnt working with nuxt #27

Open
VladStepanov opened this issue Aug 14, 2019 · 10 comments
Open

Doesnt working with nuxt #27

VladStepanov opened this issue Aug 14, 2019 · 10 comments

Comments

@VladStepanov
Copy link

VladStepanov commented Aug 14, 2019

Im using nuxt

nuxt.config.js
{ src: '~/plugins/sticky.js', ssr: false }
sticky.js
import Vue from 'vue
import Sticky from 'vue-sticky-directive

Vue.use(Sticky)

and i'm getting that.
image

What im doing wrong?

@VladStepanov VladStepanov changed the title Dont working Doesnt working Aug 14, 2019
@VladStepanov VladStepanov changed the title Doesnt working Doesnt working with nuxt Aug 14, 2019
@scoutrul
Copy link

scoutrul commented Sep 9, 2019

It is working with nuxt but i'm not satisfied becouse of bugs.

@VladStepanov
Copy link
Author

@VladStepanov were you able to solve this?

No :(

@mavrick
Copy link

mavrick commented Mar 20, 2020

if you can get away with just using css, you could try:

position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;

@Smidds
Copy link

Smidds commented Apr 3, 2020

I think one of the things myself and others enjoy about this directive is the ability to listen to sticky events and respond. I currently had to remove this from my nuxt project as it was working, but only when reloading the page that it was used on to get a fresh version from nuxt of that specific page (still not sure why).

@simplenotezy
Copy link

It's working fine for me on nuxt, but it has some issues, especially with the "onStick" callback

@tbredin
Copy link

tbredin commented Jul 9, 2020

+1

@tbredin
Copy link

tbredin commented Jul 9, 2020

For me this initialises fine in nuxt, but it never actually triggers any sticky behaviour. onStick is simply called when the page first loads:

image

@ghost
Copy link

ghost commented Jul 10, 2020

same here 👎

@isuke01
Copy link

isuke01 commented Mar 4, 2021

Actually it works for me ONLY if I set sticky-side="0" also interesting thing is if you want to work sticky-offset you must enter STRING, you cant put object... interesting ...
NOT WORKING:
:sticky-offset="{top: 500, bottom: 20}" or :sticky-offset="ObjectVarrible"
Working:
sticky-offset="{top: 500, bottom: 20}" or :sticky-offset="StringVarrible"

@JackEdwardLyons
Copy link

@isuke01 writing it as a string worked, thanks for the tip!

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

8 participants