Skip to content

Commit

Permalink
fix a pasting bug in safari
Browse files Browse the repository at this point in the history
  • Loading branch information
farthinker committed Sep 23, 2014
1 parent 62c13cf commit af1f93e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions lib/simditor-all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions lib/simditor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions site/assets/scripts/simditor-all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/selection.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ class Selection extends Plugin
save: (range = @getRange()) ->
return if @_selectionSaved

endRange = range.clone().collapse(false)
startCaret = $('<span/>').addClass('simditor-caret-start')
endCaret = $('<span/>').addClass('simditor-caret-end')

range.insertNode(startCaret[0])
range.collapse(false)
range.insertNode(endCaret[0])
endRange.insertNode(endCaret[0])

@clear()
@_selectionSaved = true
Expand Down
4 changes: 2 additions & 2 deletions src/simditor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ class Selection extends Plugin
save: (range = @getRange()) ->
return if @_selectionSaved

endRange = range.clone().collapse(false)
startCaret = $('<span/>').addClass('simditor-caret-start')
endCaret = $('<span/>').addClass('simditor-caret-end')

range.insertNode(startCaret[0])
range.collapse(false)
range.insertNode(endCaret[0])
endRange.insertNode(endCaret[0])

@clear()
@_selectionSaved = true
Expand Down

0 comments on commit af1f93e

Please sign in to comment.