-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Textangular box not getting model changes #64
Comments
+1 |
It seems to be a focus issue of the editor. $( ":focus" ).blur(); Hope it helps. |
I'm updating model in response to a button click so the text angular widget should have already lost focus no? Or are you saying we just need a blur event somewhere (anywhere) in the dom? |
For me, pressing a different nested element on the view surprisingly didn't blurred the editor (see if it has the focus border to make sure). |
Quick note - I have the fix prepped and will commit it when I can, internet is sporadic while I'm in India till the end of Jan. The issue is with the checks that prevent it from updating when ng-model is undefined. Removing those if statements seems to fix the issue but I have to go back and figure out why it was there in the first place. |
@matti I think the reason the editor toolbar buttons don't blur the editor is that they have unselectable set on them, else you wouldn't be able to keep typing after pressing one of the buttons. |
hmmm... I don't think so ;) |
@matti yea thanks, It was a guess from the email name that came through. @mbarzeev The focus issue is possibly unrelated, once the undefined bug is fixed clicking on a button that uses ng-click will clear the editor correctly due to the $digest that gets triggered. There's code in place to try prevent blur being triggered on the editor when an editor toolbar button is pressed (I assume this is what you meant by nested element on the view). If this isn't the case could you open a new issue with how to replicate it please? |
Nop, I didn't mean the toolbar buttons (they work as expected as far as I can tell), I'm talking about an issue where a nested element, external to the editor altogether, did not remove the focus from the editor itself. Weird, I know... Thanks for the help and responsiveness. |
Hullo, thanks for the fix. Its working like a charm. |
I have a model that looks a bit like:
This is referenced like so:
Now i recreate the
commentResource
The value shown in the text angular box is not updated. I've tried with a normal input type=text and the value is updated. I can work around this by explicitly setting the
comment
field to null after recreating the model... which is weird :)The text was updated successfully, but these errors were encountered: