Skip to content

May be a bug when manually trigger change detection after Worker.onmessage #14027

Closed

Description

@starDustZhi

I'm submitting a bug report

Current behavior
This is my question in stackoverflow
I create a plunker demo here
I use three methods to trigger change detection, and ApplicationRef.tick() and ChangeDetectorRef.detectChanges() does not work well.

Expected behavior
In the demo, after add a tab, and click the list, the background should change

Minimal reproduction of the problem with instructions

plunker demo

What is the motivation / use case for changing the behavior?

use angular material tab group

Please tell us about your environment:

windows10 enterprise
VS Code
npm lite-server

  • Angular version: 2.2.0
  • Browser: [Chrome ]
  • Language: [ TypeScript 2.1 ]

  • Node (for AoT issues): node --version = 6.9.4

Activity

  1. LiuMengzhou commented on Jan 20, 2017

    @LiuMengzhou

    666

  2. teropa commented on Feb 28, 2017

    @teropa
    Contributor

    I'm also seeing this. The accepted answer to the Stack Overflow question states:

    Obviously worker.onmessage is not covered by NgZone

    This seems to be true, except that there's nothing obvious about it to me. If this is by design, I think it needs to be addressed in documentation.

  3. starDustZhi commented on Mar 10, 2017

    @starDustZhi
    Author

    It is true that worker.onmessage is not covered by NgZone.

    BUT after I trigger change detection in another way, the thing is wired.
    I have created a plunker demo here

  4. added this to the Backlog milestone on Jan 23, 2018
  5. JiaLiPassion commented on May 28, 2020

    @JiaLiPassion
    Contributor

    Worker.onmessage should be patched with the latest version, will close this for now.

  6. Dassderdie commented on May 29, 2020

    @Dassderdie

    @JiaLiPassion

    Worker.onmessage should be patched with the latest version, will close this for now.

    What is the latest version in this context? I just had a few very confusing hours debugging this until I stumbled over this issue. I'm using [email protected] and [email protected]...

  7. angular-automatic-lock-bot commented on Jul 1, 2020

    @angular-automatic-lock-bot

    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.

  8. locked and limited conversation to collaborators on Jul 1, 2020
  9. JiaLiPassion commented on Jul 1, 2020

    @JiaLiPassion
    Contributor

    @Dassderdie , Worker.onmessage is patched several versions ago, so the 0.10.3 should work, if not , could you create a new issue? thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions