-
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
When changing content, the model becomes empty #484
Comments
Ahhhhh no, that's a bug from me, on my tests it actually gets through to the model then gets blanked out - it's detecting it as a blank input :(. I was trying out some "clever" logic that would allow me to check if there was no content without the regex parsing the whole string (very slow with large cases), I'll add this to the tests and fix it up. BTW, thanks for putting up your issues. |
Hi Simeon, The issue is not fixed with I also discovered that when typing some characters in the textarea, it does not get surrounded with a After these steps, you can use textAngular as expected. It surrounds the first text with a I will try to look into the issue a bit more, maybe try to simulate in a test, but I'm not sure I'll be able to figure that out... |
Weird, when I tried your quoted code above in the current pre-release I can edit and blur the editor without loosing the data. Is the new issue you mentioned similar to #463! Cause I was certain I'd fixed that one! (Also do you mean the RAW html textarea or the WYSIWYG editor?) |
As a side note, AFAIK this and your other issue are the only two issues preventing me from releasing 1.3.0, so apart from other work and my house move this weekend I'm going to get them fixed if we can pinpoint the cause. |
Helo, Zissis |
Alright, @stivni If you can confirm that this is now fixed with the latest pre-release I'm going to release 1.3.0 properly. The other issue I can't really fix until we come up with some way of reliably reproducing it. |
Awesome, thanks. |
A user pasted some content (from Word I guess) in a textAngular textarea, which was saved to the database, like this:
When initialising a textarea with the same content (by assigning the above string to the scope model variable textangular uses for its model), the contents are displayed correctly and the model also still has the right content.
When clicking in the textarea, the content and the model are still correct.
When altering the contents of the textarea, the model becomes empty, the contents are still in the textarea.
When clicking out of the textarea (blur), even when nothing is modified, both the textarea and the model are emptied.
I guess the messy html above, is causing the issues, but what can I do to sanitize it? (As it was originally put in with a textAngular textarea)
I'm using 1.3.0-19 on Chrome.
The text was updated successfully, but these errors were encountered: