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

IE8 & 9 autoscroll issue #89

Closed
sjferwerda opened this issue Jul 27, 2012 · 10 comments
Closed

IE8 & 9 autoscroll issue #89

sjferwerda opened this issue Jul 27, 2012 · 10 comments

Comments

@sjferwerda
Copy link

I'm using Swipe2 on the following page: http://www.greeleytribune.com/News/ and it works great with just about every important browser except for IE8 & IE9. In those two browsers, the autoscroll stops after the 2nd slide. I'm not seeing any errors in the console and I can advance to the next slide with next(). My code needs some refactoring, but I've even tried a barebones implementation and have had no luck.

I know that the focus of Swipe is not IE, but Swipe2 says that it does support IE. So, just wondering if anyone else has run into this issue or perhaps Swipe2 supports IE with the exception that the autoscroll doesn't work.

Thanks!

@voku
Copy link

voku commented Aug 22, 2012

... in the newest version from Swipe2 autoscroll is working also with IE -> tested ;)

@sjferwerda
Copy link
Author

Thanks, but it still does not work in IE8 & 9 with the latest Swipe2 update. The carousel hangs on the second slide/div.

@louies1
Copy link

louies1 commented Sep 4, 2012

I am having the same problem as @sjferwerda
It only loads up to the second slide in IE7 as well. It also does not load slides after the second slide when clicking the next link. Previous link does not do what it's suppose to either (in IE7, 8 & 9).

@louies1
Copy link

louies1 commented Sep 5, 2012

Ok. I had my programmer look at the js file and it seems he has fixed it the issue. All he had to do was comment out a line in the swipe.js file.

Code before he commented it out:

        if (_this._getElemIndex(elem) == _this.index) { // only call transition end on the main slide item

          if (_this.delay) _this.begin();
          _this.transitionEnd(_this.index, _this.slides[_this.index]);

        }

Code after he commented it out:

        //if (_this._getElemIndex(elem) == _this.index) { // only call transition end on the main slide item

          if (_this.delay) _this.begin();
          _this.transitionEnd(_this.index, _this.slides[_this.index]);

        //}

My programmer told me that he is a bit reluctant to do this, because he is not sure if there is a specific reason for the above specified line of code. At this point, it looks to us like it is an oversight, but we would be very grateful for some verification.

I tested in IE7, 8 & 9 and it works great now! \o/

Side note: Never mind issues explained in my previous post with the prev & next buttons. It seems to have fixed itself :-P

@sjferwerda
Copy link
Author

Hmm, glad that it worked for you, but it still does not seem to be working for me at:

http://GreeleyTribune.com

@sjferwerda sjferwerda reopened this Sep 5, 2012
@egandalf
Copy link

Had the same problem. Added the following at the end of the next(delay) method:

if (this.delay) this.begin();

Still works fine in Firefox and corrected the issue for me in IE.

@cjimenezpacho
Copy link

This works great egandalf!

Thanks for save a morning of misery :)

@egandalf
Copy link

The only problem I've found - and it looks to be intentional in the code - is that the cycle doesn't stop correctly when you trigger a prev() or next() except in IE. :S

I think removing a conditional, as mentioned in one of the previous posts, will help that. I'll test and post my findings.

@egandalf
Copy link

Ok, so adding the line to next() is good. Comment out the same line in onTransitionEnd().

Complete next() method:
next: function (delay) {
// cancel slideshow
this.delay = delay || 0;
clearTimeout(this.interval);
if (this.index < this.length - 1) this.slide(this.index + 1, this.speed); // if not last slide
else if (this.cont) this.slide(0, this.speed); //if last slide return to start
if (this.delay) { this.begin(); }
},

Complete onTransitionEnd() method:
onTransitionEnd: function (e) {
if (this._getElemIndex(e.target) == this.index) { // only call transition end on the main slide item
//if (this.delay) this.begin();
this.transitionEnd(this.index, this.slides[this.index]);
}
},

@sjferwerda
Copy link
Author

Thanks so much for everyone's work on this.

The suggested fix/fixes appear to have solved the "autoscroll stops after second slide" issue. I still am seeing a bug in IE8 and do not know if it's part of Swipe or related to how I've implemented Swipe. In any case, what's happening is that once autoscroll tries to advance past the last slide and to the beginning again, it stops and an empty div/white box appears. All other functionality works fine in IE8. Probably not a deal breaker since most people won't even be allowing the autoscroll to advance past the first few slides, but still an annoyance.

@thebird thebird closed this as completed Mar 11, 2013
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

6 participants