Fixed weird message selection in Firefox
authorAlexander Ebert <ebert@woltlab.com>
Wed, 4 Jan 2017 10:28:51 +0000 (11:28 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 4 Jan 2017 10:59:17 +0000 (11:59 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Ignore.js

index 7a9c842aaec22b8b46071d7929c0773790ed3098..c397df80434151e24ef7309eb2d82610379d4930 100644 (file)
@@ -60,6 +60,9 @@ define(['List', 'Dom/ChangeListener'], function(List, DomChangeListener) {
                        message.classList.remove('ignoredUserMessage');
                        message.removeEventListener(WCF_CLICK_EVENT, _callback);
                        _knownMessages.delete(message);
+                       
+                       // Firefox selects the entire message on click for no reason
+                       window.getSelection().removeAllRanges();
                }
        };
 });