Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
peach-html5-editor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7f075c8
)
cleanup: don't reset cursor animation on move
author
Jason Woofenden
<jason@jasonwoof.com>
Fri, 18 Mar 2016 17:55:42 +0000
(13:55 -0400)
committer
Jason Woofenden
<jason@jasonwoof.com>
Fri, 18 Mar 2016 17:55:42 +0000
(13:55 -0400)
editor.coffee
patch
|
blob
|
history
diff --git
a/editor.coffee
b/editor.coffee
index
3d3336d
..
0d9d495
100644
(file)
--- a/
editor.coffee
+++ b/
editor.coffee
@@
-892,12
+892,10
@@
class PeachHTML5Editor
@matt null
move_cursor: (cursor) ->
@cursor = cursor
@matt null
move_cursor: (cursor) ->
@cursor = cursor
- # replace cursor element, to reset blink animation
- if @cursor_visible
- @cursor_el.parentNode.removeChild @cursor_el
- @cursor_el = domify @outer_idoc, div: id: 'cursor'
- @overlay.appendChild @cursor_el
- @cursor_visible = true
+ unless @cursor_visible
+ @cursor_el = domify @outer_idoc, div: id: 'cursor'
+ @overlay.appendChild @cursor_el
+ @cursor_visible = true
@cursor_el.style.left = "#{cursor.x + overlay_padding - 1}px"
if cursor.h < 5
height = 12
@cursor_el.style.left = "#{cursor.x + overlay_padding - 1}px"
if cursor.h < 5
height = 12