+ var anchorNode = selection.anchorNode;
+ if (anchorNode.nodeType != Node.TEXT_NODE) return;
+ // Is selection still inside a node?
+ if (!$(anchorNode).closest('[x-node]').length) return;
+ if ($(anchorNode).parents('[x-annotation-box]').not('.editing').length) return;