-
Notifications
You must be signed in to change notification settings - Fork 3
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
Smarquee doesn't work for position:absolute #2
Comments
Problem is here: Line 54 in 657e62c
Workaround - to make the width of an element not 'auto' like this: .smarquee {
position:absolute;
right:0px;
left:0px; |
Ah I see. Thanks for the helpful codepen! I think adding the |
Playing with it a little and what happens is that |
This should take care of it @YuriGor. If it doesn't, please re-open the issue! |
Ok, thank you, I'll test it and report here. |
Fixed version works unstable. I updated Codepen to use the latest version from Gti:
So, as you see, sometimes widths are equal and animation starts, I am not sure where is reopen button, probably I have no permission for it, hope you'll be notified about this comment, @BuddyLReno. |
@YuriGor ah I see now. Hhmmmm maybe we leave the default calculation as
I'll make this change and push it up to a branch that maybe you could try out and see if it works before I publish a new version. |
Looks like we don't understand clearly what's happening so we will not be sure issue is really fixed. |
Documentation for scrollWidth says:
Maybe this is an answer? |
I really like the idea of also adding a force animation option so it doesn't do the needs marquee checking. Yeah I think digging into the docs for both scrollWidth and clientWidth can hopefully reveal some ideas. I'll look at experimenting with the |
Here is a codepen to reproduce
https://codepen.io/yurigor/pen/wZeBpO?editors=0110
Notice this css code:
if you will comment this line and force codepen to rerun, it will fix the problem.
I guess some initial calculations fail in case of the absolute position of the element, because when I change 'position' on the fly - everything keeps working.
The text was updated successfully, but these errors were encountered: