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

wrong first slide with html picture tag #1284

Open
netfeld opened this issue Oct 1, 2020 · 2 comments
Open

wrong first slide with html picture tag #1284

netfeld opened this issue Oct 1, 2020 · 2 comments

Comments

@netfeld
Copy link

netfeld commented Oct 1, 2020

The position of the first image is not correct set when using html picture tags insted of img. It shows the bx-clone image on the left. pager shows correctly the first slide.

If i use an slider with image tag (the full width is 1034px) the start image 0 is positioned (id="header_slider"):
width: 4215%; position: relative; transition-duration: 0s; transform: translate3d(-1034px, 0px, 0px);

If i use the slider with picture tag the start image (header_slider) is positioned:
width: 4215%; position: relative; transition-duration: 0s; transform: translate3d(0px, 0px, 0px);

Any ideas? Thx, Hauke

@netfeld
Copy link
Author

netfeld commented Oct 1, 2020

Simple Bugfix:

       onSliderLoad: function(){
            //bugfix https://github.com/stevenwanderski/bxslider-4/issues/1284
            //move to first slide
            let firstChild=$(this).children().first();
            let width=firstChild.width();
            $(this).css("transform","translate3d(-"+width+"px,0,0)");
        }

@BobDenny
Copy link

BobDenny commented Aug 3, 2021

I had the same problem in Chrome Version 92.0.4515.131 but with tags. I applied this fix and the problem was resolved. Thanks.

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

2 participants