Fixed full quote when text is manually selected
authorAlexander Ebert <ebert@woltlab.com>
Mon, 23 Jan 2017 16:33:30 +0000 (17:33 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 23 Jan 2017 16:33:30 +0000 (17:33 +0100)
wcfsetup/install/files/js/WCF.Message.js

index 5d4588f8e2552dd63e2feaf1761c21053b5a0ab3..7a8cb44354159bcc48f6b585c18b8560c0e21eac 100644 (file)
@@ -4,7 +4,7 @@
  * Message related classes for WCF
  * 
  * @author     Alexander Ebert
- * @copyright  2001-2015 WoltLab GmbH
+ * @copyright  2001-2017 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
 WCF.Message = { };
@@ -2351,6 +2351,13 @@ WCF.Message.Quote.Handler = Class.extend({
         * @param       object          event
         */
        _saveFullQuote: function(event) {
+               event.preventDefault();
+               var selection = window.getSelection();
+               if (!selection.isCollapsed && this._copyQuote) {
+                       selection.removeAllRanges();
+                       this._copyQuote.hide();
+               }
+               
                var $listItem = $(event.currentTarget);
                
                this._proxy.setOption('data', {