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

ngFor reloading on Angular Change Detection (input) #34444

Closed
danielehrhardt opened this issue Dec 17, 2019 · 3 comments
Closed

ngFor reloading on Angular Change Detection (input) #34444

danielehrhardt opened this issue Dec 17, 2019 · 3 comments
Labels
regression Indicates than the issue relates to something that worked in a previous version type: bug/fix

Comments

@danielehrhardt
Copy link

danielehrhardt commented Dec 17, 2019

🐞 bug report

Affected Package

The issue is caused by package @angular/....

@angular/compiler-cli

Is this a regression?

Yes. It is not working since Angular 9 RC4

Description

I saw this Problem since Angular 9 RC4, when I type in something in a input with a ngmodel and have some Gifs in a ngFor, the gifs starts from the beginning and flickering.

I can currently only reproduce the problem in Safari on iOS.
In the video, you can see what the problem is.
https://www.youtube.com/watch?v=wdEEszzA72Q

🔬 Minimal Reproduction

https://github.com/danielehrhardt/angular-ionic-flickering
npm i
open the project on a iOS Device in Safari

🌍 Your Environment

Angular Version:


  "@angular-devkit/architect": "~0.900.0-rc.6",
    "@angular-devkit/build-angular": "~0.900.0-rc.6",
    "@angular-devkit/core": "~9.0.0-rc.6",
    "@angular-devkit/schematics": "~9.0.0-rc.6",
    "@angular/cli": "~9.0.0-rc.6",
    "@angular/compiler": "~9.0.0-rc.6",
    "@angular/compiler-cli": "~9.0.0-rc.6",



@pkozlowski-opensource
Copy link
Member

I believe that this is duplicate of #34336 - currently we've got a bug where ngClass / ngStyle is writing to the DOM even if there is no change in the binding (as in your case here.

BTW, you can probably simplify your code (and work-around this bug) by doing [style.background-image]="url(' + 'https://media.giphy.com/media/' + test.giphy_id + '/giphy.gif' + ')'" (not tested).

@ngbot ngbot bot added this to the needsTriage milestone Dec 17, 2019
IgorMinar pushed a commit to matsko/angular that referenced this issue Jan 14, 2020
…changes

Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static
(string-based) values even if the value itself had not changed. This patch ensures that
the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been
a value change.

Fixes angular#34336, angular#34444
IgorMinar pushed a commit to matsko/angular that referenced this issue Jan 14, 2020
…changes

Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static
(string-based) values even if the value itself had not changed. This patch ensures that
the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been
a value change.

Fixes angular#34336, angular#34444
IgorMinar pushed a commit to matsko/angular that referenced this issue Jan 14, 2020
…changes

Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static
(string-based) values even if the value itself had not changed. This patch ensures that
the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been
a value change.

Fixes angular#34336, angular#34444
IgorMinar pushed a commit to matsko/angular that referenced this issue Jan 15, 2020
…changes

Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static
(string-based) values even if the value itself had not changed. This patch ensures that
the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been
a value change.

Fixes angular#34336, angular#34444
matsko added a commit that referenced this issue Jan 17, 2020
…changes (#34307)

Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static
(string-based) values even if the value itself had not changed. This patch ensures that
the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been
a value change.

Fixes #34336, #34444

PR Close #34307
matsko added a commit that referenced this issue Jan 17, 2020
…changes (#34307)

Prior to this change, in Ivy mode ngStyle/ngClass would accidentally emit value changes for static
(string-based) values even if the value itself had not changed. This patch ensures that
the style/class diffing code is more strict and when it signals ngClass/ngStyle that there has been
a value change.

Fixes #34336, #34444

PR Close #34307
@pkozlowski-opensource
Copy link
Member

This was fixed in master via abd4628

@kara kara added regression Indicates than the issue relates to something that worked in a previous version and removed severity5: ivy-compat labels Feb 11, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression Indicates than the issue relates to something that worked in a previous version type: bug/fix
Projects
None yet
Development

No branches or pull requests

3 participants