From 8dccf0521cd23d27f56b5b48f8dd05b659096569 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 23 Apr 2020 18:16:13 +1000 Subject: [PATCH] Revert "PERF: stop firing superfluous onSelectionChange" This reverts commit fa96054acf612619d66ae3c01d9e4c5a3712728c. Sadly this fails a test case, we may have to hunt up all the parentElements to check for the cooked class to perform the bypass --- .../javascripts/discourse/components/quote-button.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/discourse/components/quote-button.js b/app/assets/javascripts/discourse/components/quote-button.js index 180654099fa..8f7d464543b 100644 --- a/app/assets/javascripts/discourse/components/quote-button.js +++ b/app/assets/javascripts/discourse/components/quote-button.js @@ -188,16 +188,10 @@ export default Component.extend({ .on("mouseup.quote-button", () => { this._prevSelection = null; this._isMouseDown = false; - if (document.activeElement === document.body) { - onSelectionChanged(); - } + onSelectionChanged(); }) .on("selectionchange.quote-button", () => { - if ( - !this._isMouseDown && - !this._reselected && - document.activeElement === document.body - ) { + if (!this._isMouseDown && !this._reselected) { onSelectionChanged(); } });