Skip to content

Commit

Permalink
Merge pull request #2 from kyan/fix-style-buttons-in-chrome-65
Browse files Browse the repository at this point in the history
Fix the styling buttons in Chrome 65
  • Loading branch information
tommarshall authored Apr 12, 2018
2 parents 8615985 + 58de2c8 commit 25c2f5c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vendor/assets/javascripts/redactor-rails/redactor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6167,6 +6167,12 @@
if (this.range.collapsed === false)
{
this.selection.setNodesMarker(this.range, endNode, false);

// Patched for Chrome 58, deleting text from selection + backspace
if (this.utils.browser('chrome'))
{
this.caret.set(startNode, 0, endNode, 0);
}
}
else
{
Expand Down Expand Up @@ -6287,6 +6293,8 @@
{
var node2 = this.selection.getMarker(2);
this.selection.setMarker(this.range, node2, false);

// Patched for Chrome 58, deleting text from selection + backspace
if (this.utils.browser('chrome'))
{
this.caret.set(node1, 0, node2, 0);
Expand Down

0 comments on commit 25c2f5c

Please sign in to comment.