Potential fix for Firefox sometimes losing the text selection
authorAlexander Ebert <ebert@woltlab.com>
Sat, 13 Dec 2014 14:42:43 +0000 (15:42 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 13 Dec 2014 14:42:43 +0000 (15:42 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index ce8704d823de8e2f9670b87b85badceeb2ed5f5e..73d12e75ff784af299bf38401eacd0c869af3891 100644 (file)
@@ -87,6 +87,10 @@ RedactorPlugins.wmonkeypatch = function() {
                                this.$editor.on('mouseup.redactor keyup.redactor focus.redactor', $.proxy(this.observe.buttons, this));
                                this.$editor.on('keyup.redactor', $.proxy(this.keyup.init, this));
                        }
+                       
+                       this.$editor.on('mousedown.wmonkeypatch mouseup.wmonkeypatch', (function() {
+                               this.wutil.saveSelection();
+                       }).bind(this));
                },
                
                /**