From b939d4f9ac7f22ffe30b066dacc19bbb39a6806f Mon Sep 17 00:00:00 2001 From: Dmitri Akatov Date: Tue, 16 Jul 2013 21:48:43 -0700 Subject: [PATCH] some explanation about caret behaviour in contenteditable elements. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index c2f5121..5293bd5 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,17 @@ angular.module('myapp', ['contenteditable']) select-non-editable="true"> ``` +## Notice + +In Chrome, when a contenteditable element X contains a non-contenteditable +element Y as the last element, then the behaviour of the caret is the following: + +* When X has style `dislay` set to `block` or `inline-block`, then the caret + moves to the very far right edge of X when it is _immediately_ at the end of X + (inserting spaces moves the caret back). + +* When X has style `display` set to `inline`, then the caret disappears instead. + ## Development ```bash