ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.94k stars 13.52k forks source link

Slides v2 beta10 does not work on android #7192

Closed ValterSantosMatos closed 8 years ago

ValterSantosMatos commented 8 years ago

Slides v2 beta10 does not work on android (unable to swipe)

Expect to see 3 swiper-pagination-bullets on the bottom and be able to swipe between the screens. Worked in beta 9, works if emulate IOS device.

Steps to reproduce: Just check the Plunker.

Which Ionic Version? 2.10

Plunker that shows an example of your issue

http://plnkr.co/edit/gW6ckkR5cZ4G8e3EbiRh?p=preview

mangonecristian commented 8 years ago

Same here. It works after a window resize.

Workaround: ./node_modules/ionic-angular/components/slides/slides.js

Change this:

Slides.prototype.update = function () {
    var _this = this;
    setTimeout(function () {
        _this.slider.update();
        // Don't allow pager to show with > 10 slides
        if (_this.length() > 10) {
            _this.showPager = false;
        }
    });
};

To this:

Slides.prototype.update = function () {
    var _this = this;
    setTimeout(function () {
        _this.slider.update();
        // Don't allow pager to show with > 10 slides
        if (_this.length() > 10) {
            _this.showPager = false;
        }
    },250);
};
schankam commented 8 years ago

Also got the bug on Android (working fine on iOS). Looks like it does not work when using ion-slides inside an ion-content...

This was working fine before beta 9, noticed it only when I was on beta 10.

jgw96 commented 8 years ago

Hello all, thanks for opening an issue with us! I will be closing this issue as a duplicate of https://github.com/driftyco/ionic/issues/7089. Thanks for using Ionic!

barocsi commented 8 years ago

It's even closed in #7089 wher it should not be. It also present in simple chrome browsers. And also, why is it aligned vertically centered?