Closed sjelin closed 8 years ago
Sounds good to me.
I have the exactly the same problem. I have an Angular2
app with Semantic-UI. After upgrading zone.js
from 0.5.x to 0.6.x almost every Semantic-UI component, such as modal window or dropdown throws the SafeSubscriber
errors, whether its Task does not support cancellation, or is already canceled.
or undefined is not an object (evaluating 'task.zone')
errors from SafeSubscriber
.
Consider the following code snippet:
According to the DOM spec, the second
removeEventListener
should do nothing. However, withzone.js
loaded it produces the following error message:Basically, the problem is that the patched
removeEventListener
will cancel the task, but never removes it from the list of registered tasks. So when the secondremoveEventListener
happens it tries to cancel the task again, leading to the problem. I suggest we start removing it from the list of registered tasks, unless there is a reason it has to stay there.