harm-less / angular-sticky

Pure javascript AngularJS directive to make elements stick when scrolling
http://harm-less.github.io/angular-sticky
83 stars 38 forks source link

Doesn't work with inner scrolling areas. #13

Open Aaron-Pool opened 8 years ago

Aaron-Pool commented 8 years ago

Unless I'm totally misreading the docs, there doesn't seem to be a way to make elements stick within a scrollable area that isn't the main area. That's probably a pretty important feature to a large group of people (including me).

harm-less commented 8 years ago

Hey Aaron, I'm fully aware of this and recently needed the feature myself too. I just haven't had time to do so unfortunately. I'm currently working on a complete refactoring of the sticky engine which would surely include this feature. But I don't want to make any promises as I'm not quite sure about the scope of the project and when exactly I can work on it. So I'll keep it in mind.

sandeepsukhija commented 8 years ago

@harm-less any update on this?

Disorrder commented 8 years ago

need this feature too

paulflo150 commented 7 years ago

@harm-less any thoughts on when this may make it into a release? Thanks!

developandbehappy commented 4 years ago

Oh, i need it in this moment :(

harm-less commented 4 years ago

Hey @zidein07, I'm not planning on actively developing on this repo. It's ok if you or someone else wants to make a PR to support this feature.

developandbehappy commented 4 years ago

Hi @harm-less . We use your directive in a biggest bank in russia ;) Unfortunately we use angularjs yet :) May be i'll make a PR. Thank you for your answer!

harm-less commented 4 years ago

That's amazing, that's great to hear and I'm glad you trust my code! :D It's too bad big often means legacy, but it's understandable to some degree.

A PR will be nice and of course you can always fork it and walk your own path.

phazei commented 4 years ago

Spent a day making an attempt at this, has a lot of technical hurdles. If it's inside a scrolling div, position fixed can't be used because it will show even if it's outside the overflow area, so it would need to be switched to using transform translate ~position absolute~ instead. Also need to change the scroll event listener since it needs to trigger on any scrolling, not just on window.
This is incomplete: https://github.com/harm-less/angular-sticky/pull/46