Discard the current selection when saving a quote
authorAlexander Ebert <ebert@woltlab.com>
Sun, 6 Dec 2020 20:16:16 +0000 (21:16 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 6 Dec 2020 20:16:16 +0000 (21:16 +0100)
wcfsetup/install/files/js/WCF.Message.js

index 6450ff7e83f86b4f005f7ea8acb8e9858cc7fd5c..6b0a5ec43bd5b3810a404a8dee50ca0542ad35fb 100644 (file)
@@ -1592,6 +1592,12 @@ if (COMPILER_TARGET_DEFAULT) {
                                }
                        });
                        this._proxy.sendRequest();
+                       
+                       const selection = window.getSelection();
+                       if (selection.rangeCount) {
+                               selection.removeAllRanges();
+                               this._copyQuote[0].classList.remove("active");
+                       }
                },
                
                /**