vue-sticky-directive icon indicating copy to clipboard operation
vue-sticky-directive copied to clipboard

Doesnt working with nuxt

Open dsfcoll opened this issue 6 years ago • 10 comments

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?

dsfcoll avatar Aug 14 '19 18:08 dsfcoll

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

scoutrul avatar Sep 09 '19 10:09 scoutrul

@VladStepanov were you able to solve this?

No :(

dsfcoll avatar Oct 16 '19 07:10 dsfcoll

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

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

mavrick avatar Mar 20 '20 03:03 mavrick

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).

Smidds avatar Apr 03 '20 20:04 Smidds

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

simplenotezy avatar Apr 16 '20 11:04 simplenotezy

+1

tbredin avatar Jul 09 '20 02:07 tbredin

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

tbredin avatar Jul 09 '20 04:07 tbredin

same here 👎

ghost avatar Jul 10 '20 12:07 ghost

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"

isuke01 avatar Mar 04 '21 13:03 isuke01

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

JackEdwardLyons avatar Oct 19 '21 04:10 JackEdwardLyons