JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
update (textarea) after delete/backspace
authorJason Woofenden <jason@jasonwoof.com>
Sat, 12 Mar 2016 18:28:51 +0000 (13:28 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Sat, 12 Mar 2016 18:28:51 +0000 (13:28 -0500)
editor.coffee

index b7406dd..e1937a0 100644 (file)
@@ -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