Giter VIP home page Giter VIP logo

Comments (11)

ssbyoung avatar ssbyoung commented on June 1, 2024 1

Hey, thanks for getting back to me so quickly.

I didn't realize that it'd default to fixed. That explains quite a bit to me.

As for your questions

  • Currently we're only really supporting desktop browsers, so mobile isn't too much an issue.
  • The modal is already existing in the app at the moment. I thought get a quick UX win by adding sticky functionality. However, it seems like we might be re-designing it in the near future. So it might not be necessary.

All things considered, it seems like you're right. Stickybits probably isn't the solution I'm looking for. I was secretly hoping there was some javascript magic under the hood to polyfill what I needed. But I understand that that's really difficult.

However, if I'm looking at doing something a bit less complicated where sticky stuff makes sense, I'll definitely drop by again.

Thanks for your help!

from stickybits.

yowainwright avatar yowainwright commented on June 1, 2024 1

@ssbyoung I have an idea to support your request. https://codepen.io/yowainwright/pen/EXzJeb

I changed window to #modal so the scroll event is attached to #modal. It is a minimal enhancement. I'm going to add it.

Thanks for pointing this issue out!!! πŸ™Œ

from stickybits.

yowainwright avatar yowainwright commented on June 1, 2024

Thanks for sharing your issue @ssbyoung ! I'll look into it as soon as possible.

from stickybits.

yowainwright avatar yowainwright commented on June 1, 2024

From my πŸ‘€ : IE doesn't support position: sticky so Stickybits defaults to position: fixed. The <element> that is supposed to be sticky would be set to fixed if it wasn't within a fixed element. 😒 As fixed <elements> are fixed relative to the browser window the second fixed item doesn't work.

Sorry if I'm not being clear. This is pretty complex!

I have a few questions:

  • Is the modal you're making visible on devices?
  • not meant to sound rudeβ€”why is the modal so complex? Like, what's the use case?

I'm asking these things because I'm leaning towards a custom solution. If possible, I'd like to help write something for this but I'm leaning towards saying Stickybits isn't a one stop shop for the problem you shared. I won't leave you hanging though! πŸ™Œ

from stickybits.

yowainwright avatar yowainwright commented on June 1, 2024

@ssbyoung do you have time to help me out and see if my un-published in npm version works for you in IE?!!! πŸ™

from stickybits.

ssbyoung avatar ssbyoung commented on June 1, 2024

@yowainwright sure, I can take a look. I'll get in contact with you

from stickybits.

yowainwright avatar yowainwright commented on June 1, 2024

@ssbyoung I had to update variable calculations in 2 places = working on it. 🀘

from stickybits.

yowainwright avatar yowainwright commented on June 1, 2024

@ssbyoung The calculations have been updated. I'm going to make a codepen and test before publishing in NPMβ€”feel free to grab the code from GH /dist if you want to test drive.

from stickybits.

yowainwright avatar yowainwright commented on June 1, 2024

@ssbyoung still not perfect in IE with a custom scrollEl. We're getting closer though.

from stickybits.

yowainwright avatar yowainwright commented on June 1, 2024

@ssbyoung Stickybits is as good as it can get w/ the known issue of a fixed element within a fixed element.


From the updates that were made, I'd say that changing the margin-top of a position: relative parent element (the modal) on a scroll event could get the codepen you made close to what you might want. 😬

Thanks for the challenge. Please reach out w/ any ideas, etc.

from stickybits.

ssbyoung avatar ssbyoung commented on June 1, 2024

Hey man. Thanks for trying! I'll keep you up to date if I run into anything else!

from stickybits.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.