Clarity: Modal and Wizard with form throws an error when pressing escape to close

Created on 23 Jul 2017  路  20Comments  路  Source: vmware/clarity

Select one ... (check one with "x")

[X] bug
[ ] feature request
[ ] enhancement
### Expected behavior Don't throw an error when pushing "escape" to close a modal with a form. ### Actual behavior 1) Open the modal 2) Click the input (so it's `ng-touched`) 3) Press "escape" 4) Observe the error thrown in the console
Error
ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'.
    at viewDebugError (errors.ts:30)
    at expressionChangedAfterItHasBeenCheckedError (errors.ts:29)
    at checkBindingNoChanges (util.ts:145)
    at checkNoChangesNodeInline (view.ts:477)
    at checkNoChangesNode (view.ts:568)
    at debugCheckNoChangesNode (services.ts:557)
    at debugCheckRenderNodeFn (services.ts:500)
    at Object.eval [as updateRenderer] (app.component.html:17)
    at Object.debugUpdateRenderer [as updateRenderer] (services.ts:477)
    at checkNoChangesView (view.ts:383)

Reproduction of behavior

https://plnkr.co/edit/FJLwhI13nzeETVqWBYI2?p=preview

Environment details

  • Angular version: 2.0.X

  • Clarity version: 0.9.7

  • OS and version: Mac

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

bug

All 20 comments

@exk0730
This is working for me in Chrome, using the plunkr provided and the steps to reproduce. It works fine for me.

Which browser are you using?

@mathisscott Do you mean you don't get an error?

Yeh, Chrome Version 59.0.3071.115 on Mac OS X 10.11.6

I am on Chrome 59.0.3071.115 (64-bit). Mac OS X 10.11.6.

Opening the plunkr and going through the steps to reproduce this morning, I cannot replicate.

Could this have been fixed by #1169 ?

I was able to reproduce the error, make sure you click on the input to set the focus and then hit escape.

Yes, that is what I'm doing. I'm very good at following directions; just ask my wife!

@exk0730: Could you please try updating to the latest 0.9 version and see if the error goes away? The latest version is 0.9.14: https://vmware.github.io/clarity/news/0.9.14

@deviant32, @exk0730 - I have reproduced the issue and am looking into it. I'll post here again when I have more info for you.

@mathisscott Lol!

@adityarb88 I think the plunker is actually using the latest, but I first noticed it in my own app with 0.9.7 and wanted to make sure it wasn't my app causing the issue

@hippee-lee Awesome! Thanks.

@hippee-lee : Any update on this?

It seems like a real bug but only under specific conditions.
Here is my fork of the provided plunk: https://plnkr.co/edit/L63h8hSOeXkTEgH09QPL?p=preview

Case 1

  1. I open the model
  2. Put focus into the text box
  3. Press escape -> it throws the _ehcaiwc_ (Chocolate) error.

Case 2

  1. I open the model
  2. I put text in it
  3. Escape -> no error
  4. Reopen and remove the text -> No error

I don't have an exact cause yet but it feels like a lifecycle issue and/or ngModel issue.

@hippee-lee
Any update on the root cause here?

@mathisscott - fyi still working on this.

I am also seeing this issue in wizards. Updated the title to reflect that.

@mathisscott @hippee-lee Hey Matt, is there any special thing I need to do to get this bug to go away in 0.10.4/5? I tried using your demo files in a plunker, and the error is still thrown.

https://plnkr.co/edit/RTK6txS9QGYjTSzr0FMo

@exk0730
Make sure the plunkr is using clarity 0.10.5...

@mathisscott It's using 'unpkg' npm:clarity-angular/clarity-angular.umd.js which points to the latest, if I'm not mistaken...

@mathisscott - I'm looking into this. Re-opening for now, debugging on plunker wasn't working for me with clarity-angular this morning.

@exk0730 - this bugfix will be released this week. It's merged to master but hasn't been released yet. Please follow up if you continue to experience the expression has changed after it was checked error on modals or wizards.

@hippee-lee Ahhhh gotchya. Yeah, I saw #1472 and figured it was already merged to a release. Thanks Matt!

Hi there 馃憢, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elesueur picture elesueur  路  3Comments

mayesgr picture mayesgr  路  3Comments

srikanthps picture srikanthps  路  3Comments

amellnik picture amellnik  路  3Comments

Vad1mo picture Vad1mo  路  3Comments