X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-html5-editor.git;a=blobdiff_plain;f=editor.coffee;h=60ea8320146939ded271e99d06aa276360a4d29e;hp=9f6d8eb34473d0b762c37e059887afa244d57378;hb=887afa2c256c214ae5c3b9583a980c842121e912;hpb=e63123d22c65f954f27b830f149c1a1500ba0c97 diff --git a/editor.coffee b/editor.coffee index 9f6d8eb..60ea832 100644 --- a/editor.coffee +++ b/editor.coffee @@ -1378,8 +1378,7 @@ class PeachHTML5Editor return false # after calling this, you MUST call changed() and adjust_whitespace_style() insert_character: (n, i, char) -> - return if @cursor.n.parent is @tree_parent # FIXME implement text nodes at top level - parent = @cursor.n.parent + return if n.parent is @tree_parent # FIXME implement text nodes at top level # insert the character if @insert_should_replace n, i n.text = char