ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: White flash appearing when switching between tabs on Android

Open wonderdogone opened this issue 11 years ago • 121 comments

Type: bug

Platform: android 4.4 webview

when switching between tabs ONLY on Android platform, the app show a white flash. This is in 1.0.0 stable. Not using crosswalk. Forum post http://forum.ionicframework.com/t/white-flash-appearing-when-switching-between-tabs-on-android-in-1-0-0-stable/24774

wonderdogone avatar Jun 09 '15 08:06 wonderdogone

+1 , is there any other solutions?

FreezeSoul avatar Dec 31 '15 13:12 FreezeSoul

wow this is still going on.eh..Was figuring the core team would have a good idea what this wasAnyone have a good pointer to source code we might start experimenting with?

wonderdogone avatar Jan 02 '16 21:01 wonderdogone

Did 1.2 fix this? There was a commit in there that should have addressed this issue.

mlynch avatar Jan 02 '16 21:01 mlynch

The bug is still here on 1.2 to 1.2.2

ghost avatar Jan 04 '16 09:01 ghost

I tried again and it is solved if you put :

ionic.requestAnimationFrame(onReflow);  

as he said, and not :

$timeout(function() {
              ionic.requestAnimationFrame(onReflow);
            });

Obviously, $timeout is doing something

ghost avatar Jan 04 '16 22:01 ghost

@mlynch maybe you remember what this was for? https://github.com/driftyco/ionic/commit/d0246cf975bb4022eb890d3b0c28964e3065644c#diff-e25bdd32bda2f4f00f01c823ec86b1f3

Seems to have broken it again.

andreialecu avatar Jan 04 '16 23:01 andreialecu

Maybe this is why :

if code is queued using $timeout, it should run after the DOM has been manipulated by Angular, and after the browser renders (which may cause flicker in some cases)

ghost avatar Jan 04 '16 23:01 ghost

Reviewing for 1.2.5

mlynch avatar Jan 05 '16 01:01 mlynch

Unfortunately, this broke #4782 which caused the back view to sometimes not animate correctly. Removing $timeout is probably too simplistic of a solution for this.

mlynch avatar Jan 05 '16 01:01 mlynch

still have the issue even when I remove the timeout..

AdrienDC avatar Jan 08 '16 05:01 AdrienDC

+1

luco avatar Jan 14 '16 19:01 luco

Have this issues as well...

brentoneill avatar Jan 16 '16 16:01 brentoneill

+1

balicekt avatar Jan 18 '16 01:01 balicekt

+1

feliksalbright avatar Jan 18 '16 22:01 feliksalbright

note, updating your bower.json helps (correct highlighting), but there is a slight delay as mentioned

{ "name": "HelloIonic", "private": "true", "devDependencies": { "ionic": "driftyco/ionic-bower#1.7.12", //HERE, MAKE SURE IT'S UPDATED "aws-sdk-js": "~2.0.9", "bootstrap": "~3.2.0", "platform.js": "platform#~1.3.1" } }

Anyway, the slight flash is only on android, and it's just a fraction of a second.

feliksalbright avatar Jan 18 '16 22:01 feliksalbright

Can anyone confirm that 1.2.3 "copenhagen" fixes this issue?

sean-hill avatar Jan 19 '16 20:01 sean-hill

@mhartington @mlynch I can confirm this is still not working property with version 1.2.3. Take a look at these sequence of screenshots.

I'm first starting on my Bills tab like this: screen shot 2016-01-19 at 2 05 26 pm

I then tap on my Roommates tab and the following steps occur (which causes the blink):

  1. App says "Bills" for title but showing the cached "Roommates" tab screen shot 2016-01-19 at 2 05 38 pm
  2. App then removes all content, but still shows "Bills" title screen shot 2016-01-19 at 2 05 48 pm
  3. App shows "Roommates" content screen shot 2016-01-19 at 2 05 59 pm
  4. App fades in "Roommates" title screen shot 2016-01-19 at 2 06 15 pm

With all of these steps combined it creates a hideous flicker when switching tabs.

To see the bug in affect, take a look at this video: https://dl.dropboxusercontent.com/u/97539058/Bugs/tabs-bug.mp4

sean-hill avatar Jan 19 '16 21:01 sean-hill

Hey I realized that my bug was an issue with using SQLite in my application. Sorry for the confusion.

sean-hill avatar Jan 19 '16 22:01 sean-hill

+1

mitiaptest avatar Jan 28 '16 17:01 mitiaptest

+1

xibre avatar Jan 29 '16 06:01 xibre