alohaeditor/Aloha-Editor — Issue #365: Dynamic insert of a new editable generates error on [nsIDOMHTMLBRElement.compareDocumentPosition] 
Author: xVinicius
Created: 2011-12-01 18:16:30+00:00
State: open

Hi Guys, first of all i would like to say that Aloha is one of the best projects i ever seen, congratulations for all you guys!

I'm using aloha to make a "google docs like" project and one of the features that i'm working now is when the user reaches the bottom of page, the script have to create another "page" for the user continue the writing... but when i append a new

to the end of the body and start adding new texts or i try to navigate through the editables using TAB i get this error:
Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)[nsIDOMHTMLBRElement.compareDocumentPosition]
return node1.compareDocumentPosition(node2);

The script that appends the new html:
{
$('body').append("\

\");
Aloha.jQuery('.editable').aloha();
}

I searched for a better way of doing this but i didnt have sucess....sorry about my bad english, i hope i explained it clear.

Thanks in advice