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
51.01k stars 13.51k forks source link

bug: Ionic 5 // Android 5 // Ion-Segment errors #20487

Closed SSuarezBrooktec closed 4 years ago

SSuarezBrooktec commented 4 years ago

Bug Report

Ionic-Segment do not work on Android 5.1

Ionic version:

[x] 5.x

Steps to reproduce: Click on segment button

Related code:

Check this repo: https://github.com/SSuarezBrooktec/Ionic5_ion_segment_error

Other information:

Ionic info:


Ionic:

   Ionic CLI                     : 6.1.0 (/Users/sergio/.nvm/versions/node/v13.0.1/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.0
   @angular-devkit/build-angular : 0.803.25
   @angular-devkit/schematics    : 8.3.25
   @angular/cli                  : 8.3.25
   @ionic/angular-toolkit        : 2.1.2

Capacitor:

   Capacitor CLI   : 1.5.0
   @capacitor/core : 1.5.0

Utility:

   cordova-res (update available: 0.9.0) : 0.8.1
   native-run                            : not installed

System:

   NodeJS : v13.0.1 (/Users/sergio/.nvm/versions/node/v13.0.1/bin/node)
   npm    : 6.13.7
   OS     : macOS Catalina
SSuarezBrooktec commented 4 years ago

ion-segment do not working due a queryselector error in console on change segment-button. Can't change segment.

74525451-6d085880-4f21-11ea-8f30-71d07ed7ea14

liamdebeasi commented 4 years ago

Thanks for the issue. Did you upload the correct code? The repo looks like it is just the default tabs starter app.

SSuarezBrooktec commented 4 years ago

Yes, try to compile and check this app in Android 5.1 (tabs not work)

liamdebeasi commented 4 years ago

I tried the app and all I see is the default Ionic 5 starter. I do not see any ion-segment usage. Can you double check that you pushed the latest code?

SSuarezBrooktec commented 4 years ago

sorry! hehe, uploading again

Try now :)

liamdebeasi commented 4 years ago

It looks like this is the same issue as https://github.com/ionic-team/ionic/issues/20466, so I am going to combine these two issues. I will post any updates regarding this on the linked thread. Thanks!

gminhaneli commented 4 years ago

@liamdebeasi consegui replicar o problema, é o uso do bloqueio do touch no ngOnInit ou ionViewDidEnter

  document.addEventListener("touchstart", () => { this.slides.lockSwipes(true); }, false);
  document.addEventListener("touchend", () => { this.slides.lockSwipes(true); }, false);
  document.addEventListener("touchcancel", () => { this.slides.lockSwipes(true); }, false);
  document.addEventListener("touchleave", () => { this.slides.lockSwipes(true); }, false);
  document.addEventListener("touchmove", () => { this.slides.lockSwipes(true); }, false);
SSuarezBrooktec commented 4 years ago

Olá Gustavo, eu entendo um pouco de portugues, mas seria melhor se tu escrevas ao ionic team em ingles :D

ionitron-bot[bot] commented 4 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.