From ff4d456e969a1ceed01aca56e3cbf45279906e50 Mon Sep 17 00:00:00 2001 From: christian Date: Fri, 16 Mar 2012 01:44:58 +0000 Subject: [PATCH] fixes to ie ce test demo --- demos/playground/flip.html | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/demos/playground/flip.html b/demos/playground/flip.html index a6d80ce7c7..c19658edc8 100644 --- a/demos/playground/flip.html +++ b/demos/playground/flip.html @@ -25,10 +25,14 @@ $('#editor').attr('contenteditable', true); }) .focus(function() { - console.log('thumbnail has focus. this probably shouldn't happen.'); + console.log('thumbnail has focus. this probably should not happen.'); }); $('#editor').click(function() { - if ($(rangy.getSelection().anchorNode).closest('[contenteditable="false"]').length) { + var node = rangy.getSelection().anchorNode; + while (node.nodeType === 3) { + node = node.parentNode; + } + if (!node.isContentEditable) { console.log('cursor is in the wrong place. fix it!'); } }); @@ -36,6 +40,7 @@