Fixed selection fragments still present after applying format
authorAlexander Ebert <ebert@woltlab.com>
Wed, 22 Feb 2017 13:54:34 +0000 (14:54 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 22 Feb 2017 13:54:39 +0000 (14:54 +0100)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabColor.js
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabFont.js
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabSize.js

index 9994fc7c302e25615f3b5668218729994738ff1d..7a681fc9ec2d2d3e8133ecbf94fe70e5d00cfa22 100644 (file)
@@ -55,6 +55,8 @@ $.Redactor.prototype.WoltLabColor = function() {
                                
                                this.buffer.set();
                        }).bind(this));
+                       
+                       this.selection.restore();
                },
                
                removeColor: function() {
@@ -67,6 +69,8 @@ $.Redactor.prototype.WoltLabColor = function() {
                                
                                this.buffer.set();
                        }).bind(this));
+                       
+                       this.selection.restore();
                }
        };
 };
index e2e9c2828e398837ce2f5527f7eb86090a63a052..52c414ace7b7eed34154a10232e57e13e6950be9 100644 (file)
@@ -56,6 +56,8 @@ $.Redactor.prototype.WoltLabFont = function() {
                                
                                this.buffer.set();
                        }).bind(this));
+                       
+                       this.selection.restore();
                },
                
                removeFont: function() {
@@ -68,6 +70,8 @@ $.Redactor.prototype.WoltLabFont = function() {
                                
                                this.buffer.set();
                        }).bind(this));
+                       
+                       this.selection.restore();
                }
        };
 };
index 1fcf3074c18095b5e57ee6228da5e4a952b217fa..f95c4dc3144e02e3e1905476196d6b1379f62ccb 100644 (file)
@@ -46,6 +46,8 @@ $.Redactor.prototype.WoltLabSize = function() {
                                
                                this.buffer.set();
                        }).bind(this));
+                       
+                       this.selection.restore();
                },
                
                removeSize: function() {
@@ -58,6 +60,8 @@ $.Redactor.prototype.WoltLabSize = function() {
                                
                                this.buffer.set();
                        }).bind(this));
+                       
+                       this.selection.restore();
                }
        };
 };