OK, I have a jsfiddle that demonstrates this issue: 
http://jsfiddle.net/ed4becky/NJnyU/36/

I have a contenteditable field.  when it has focus a formatter bar pops up. 
 

Scenerio 1:
Select text. Text is highlighted
Click the italic button.  text is converted to italic and still highlighted
Click italic button.  text SHOULD revert, but instead nothing happens and 
text is no longer highlighted.

I can select again and repeat

So it seems that though it LOOKS selected the second time, its not.

So for the bold button I cleared the selection to reflect that.  But still 
an issue

Scenario 2:
Select text. Text is highlighted
Click the bold button.  text is converted to bold and selection cleared
Select text. Text is highlighted
Click the italic button.  NOTHING happens and text is highlighted
Select text. Text is highlighted
Click the italic button.  text is converted to italic and still highlighted

So whether I clear the selection or not, the real issue seems to be that 
the selection only works (sticks?) every other time.

IF I REMOVE THE REFERENCE TO ng-model IN THE HTML (and remove the 
dependency on it in the directive), everything works as one would expect.

 I suspected at first that since the model changed, angular was 
re-rendering effectively clearing the selection.  That would explain 
Scenario 1. But if that was ALL that was happening, Scenerio 2 should still 
work.


help?


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to