Fixed a few selection issues
authorAlexander Ebert <ebert@woltlab.com>
Sun, 31 Jul 2016 19:56:57 +0000 (21:56 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 31 Jul 2016 19:57:36 +0000 (21:57 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabImage.js
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabLink.js
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabModal.js

index e48ef1ffaed9b0f6534828caa30675f61a20551c..7d8f83744745c9380b09529c0ca425ccd5e5d11e 100644 (file)
@@ -154,6 +154,9 @@ $.Redactor.prototype.WoltLabImage = function() {
                        }
                        
                        this.modal.close();
+                       
+                       this.buffer.set();
+                       
                        this.insert.html(html);
                }
        };
index d2f6c61602bdc2c862d9c4f6d1d256e514e36eb8..c7a5f7da1ea7d11013798d36cc498bf74b3ddbc6 100644 (file)
@@ -19,6 +19,8 @@ $.Redactor.prototype.WoltLabLink = function() {
                                e.preventDefault();
                        }
                        
+                       this.selection.save();
+                       
                        // close tooltip
                        this.observe.closeAllTooltip();
                        
@@ -36,7 +38,7 @@ $.Redactor.prototype.WoltLabLink = function() {
                                                return false;
                                        }
                                        
-                                       this.selection.restore();
+                                       //this.selection.restore();
                                        
                                        // insert or update
                                        this.link.insert(link, true);
index c41f06c1ecab1dafe10bbdaf9be395a3f3562ce0..4374a499ec508f457c2fb5dc6731313e1516b689 100644 (file)
@@ -10,6 +10,8 @@ $.Redactor.prototype.WoltLabModal = function() {
        // need to go there nor will it work
        var _methods = {
                close: function() {
+                       this.selection.restore();
+                       
                        _uiDialog.close(this);
                },