From: Jason Woofenden Date: Sat, 12 Mar 2016 18:28:51 +0000 (-0500) Subject: update (textarea) after delete/backspace X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-html5-editor.git;a=commitdiff_plain;h=0d08650c4c8c17d8218fdb31e6ff65f3568a81bd update (textarea) after delete/backspace --- diff --git a/editor.coffee b/editor.coffee index b7406dd..e1937a0 100644 --- a/editor.coffee +++ b/editor.coffee @@ -757,6 +757,7 @@ class PeachHTML5Editor @cursor[0].text = @cursor[0].text.substr(0, @cursor[1] - 1) + @cursor[0].text.substr(@cursor[1]) @cursor[0].el.nodeValue = @cursor[0].text @move_cursor [@cursor[0], @cursor[1] - 1] + @changed() return false when KEY_DELETE return false unless @cursor? @@ -764,6 +765,7 @@ class PeachHTML5Editor @cursor[0].text = @cursor[0].text.substr(0, @cursor[1]) + @cursor[0].text.substr(@cursor[1] + 1) @cursor[0].el.nodeValue = @cursor[0].text @move_cursor [@cursor[0], @cursor[1]] + @changed() return false when KEY_ENTER return false