Felipe
Felipe

Reputation: 69

ion-content scrolling stopped working on ios 14

My app stopped working some screens right after iOS 14.0 update, when I test on an 13.5 emulator it is working normally.

I'm already using the following code:

ion-app.platform-ios12 ion-content {
   pointer-events: auto; / * fix scroll lock on ios12.2 * /
}

and I also tried to force the screen to scroll by css, but no news :(

Has anyone faced a similar situation? Any leads would help! My settings:

Ionic:
   Ionic CLI                     : 6.11.8 
   @angular/cli                  : 8.1.3
Capacitor:
   Capacitor CLI   : 2.4.2
   @capacitor/core : 2.4.2
System:
   npm    : 6.14.8
   OS     : macOS Catalina

Upvotes: 3

Views: 3579

Answers (3)

Sampath
Sampath

Reputation: 65870

This works on Ionic 3 project

variables.scss

ion-app.platform-ios14 ion-content { 
          pointer-events: auto !important;
}

Upvotes: 0

Felipe
Felipe

Reputation: 69

Guys I've figured it out, apparently my project contained an SCSS class that had a problem in the following items:

.background {
  background: #f2f2f2;
  top: 0;
  position: absolute;
  overflow: hidden;
  z-index: -1; <--------------- PROBLEM
  transition-property: none;
  transform: translateX(0%) translateY(0px);
}

After removing the top: 0 and the z-index, the scrolling of the screen returned to work. What I found the most strange is that in iOS version 13.x it worked smoothly. But okay, the important thing is that it worked again ;)

Upvotes: 3

Imam Ghozali
Imam Ghozali

Reputation: 71

You need to update your code to point to iOS 14 like this

ion-app.platform-ios14 ion-content { pointer-events: auto; }

Upvotes: 4

Related Questions