-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
two-way binding not working properly #38
Comments
Hi There, Thanks for opening an issue! I'm having trouble replicating this, my example is here: http://codepen.io/SimeonC/pen/ftJyg |
I will try to do my best, but my english is not as good as i'd like. Write 'something' in the textangular widget. By the way, textAngular is awesome, and i will be happy to be helpul. Hi There, Thanks for opening an issue! I'm having trouble replicating this, my example is here: — |
Thanks, those steps are what I needed. I can see the problem now. |
OK, this is fixed in some of the changes I've been making to fix other issues. |
Hello @SimeonC, Can you confirm that this was fixed in the 1.1.1? I'm using the 1.1.1 and I'm still experiencing the issue. Congrats for your work guys. Textangular is just great! ;) |
Hi @dapids. This is what I get for releasing other important fixes and not checking closed commits. No it's not fixed in 1.1.1 - The other issues are to do with this are some HTML parsing and they are being a pain to fix so I ended up releasing an interim version with 1.1.1 with some other fixes - Namely #30. I'm hoping to get this done in the next week or so and release with 1.1.2. Sorry about the Confusion! I'll try to be more consistent in future. |
…r#30, textAngular#19 Updates the fix introduced in textAngular#5 to be more specific and less of a catch all. Changed version to v1.1.2
I'm going to close this with the release of the 1.1.2-alpha. If that doesn't fix it for you please do re-open the issue. |
…r#30, textAngular#19 Updates the fix introduced in textAngular#5 to be more specific and less of a catch all. Changed version to v1.1.2
I am experiencing this same bug in 1.2.2. A normal textarea element behaves like this:
A text-angular element behaves like this:
|
I'm also seeing this issue in 1.2.2 and head of the 1.3 branch. I tracked it down to this conditional in the ngModel.$render override:
The specific problem is if the ngModel value updates from a background operation while the textangular element has focus. The above conditional fails the check for $document[0].activeElement !== scope.displayElements.html[0] , and skips updating scope.html. I did experiment with changing the conditional, but there's a second spot in the codebase that has a similar check, the ngModel.render function for the taBind directive.
It seems like both of these blocks would need to change the conditionals to not rely on checking activeElement to resolve this issue. I don't feel like I have a good enough understanding of the codebase to know if there's a good alternative to checking activeElement, otherwise I'd submit a PR. |
From memory the problem was that if we don't have that check then we end up with an infinite loop of model updates view updates model etc. I'll have another look into it soon. |
Landed in v1.3.6 |
Is this still fixed (like in in 1.3.11)? #660 may be related |
Yup. Looks like it got back in somehow. |
I am getting similar issue. When the mode changes, the editor does not show changes. When I either focus or remove focus from textarea, it gets reflected. Can't we have the changes displayed immediately as the model is changing? |
If you edit the text, and them change the model, the text-angular does not change.
If you write something in the textbox and then click the reset button, it works fine.
If you write something in the textangular and then click the reset button, it does not work.
The text was updated successfully, but these errors were encountered: