Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Conversation

@43081j
Copy link
Contributor

@43081j 43081j commented Nov 26, 2014

There are quite a few cases where this $apply call causes the usual digest in progress error (see #73).

Using $applyAsync seems to solve the issue as we don't really care about changing it immediately, but rather on the next digest.

@geyang
Copy link

geyang commented Dec 5, 2014

Uhm how come this single line change can cause the Travis CI build to fail? or the build was failing to begin with?

I hope the owner can come in and merge this PR. Otherwise we might just use @43081j 's #master

@Hypercubed
Copy link

+1, helped me.

@PowerKiKi
Copy link

ui-codemirror declare a dependency on Angular ^1, but I believe $evalAsync is not available in the 1.0 branch. So dependency should be updated accordingly in this PR.

@43081j
Copy link
Contributor Author

43081j commented Dec 7, 2014

Tried to update to ~1.3 instead, as I believe that is when $applyAsync was introduced.

However, tests still somehow fail, checking it out now.

@43081j
Copy link
Contributor Author

43081j commented Dec 7, 2014

The failing tests seem to be checking that the CodeMirror constructor has been called with the defaults and the additional options.

However, in the source, it seems we don't ever call the constructor with the defaults? so the tests fail because they just get the value and additional opts, from ui-codemirror.js#L29.

@geyang
Copy link

geyang commented Dec 7, 2014

Thank you guys for all of the work here. hey @douglasduteil, would you mind take a look at this? I think people here really want to get this PR merged and the issue fixed.
Cheers!

@43081j
Copy link
Contributor Author

43081j commented Dec 7, 2014

I changed the tests to also use ngModelController instead of matching on class names as it seemed unreliable and the 1.3 update changed the classes a lot.

The remaining broken tests are due to the default options not being passed into the constructor (ever?).

@douglasduteil
Copy link
Contributor

Hi there sorry for not being there for so long...
I'll hack on it

douglasduteil pushed a commit that referenced this pull request Dec 8, 2014
Use applyAsync instead of apply, to avoid digest in progress issues

Close #73 #74 #66
@douglasduteil
Copy link
Contributor

Alright thanks a lot @43081j

@geyang
Copy link

geyang commented Dec 10, 2014

Good job everyone!! Yay :) I am glad that we finally got this done!!

Cheers!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants