FIX: Apply quote selection workaround to all browsers (#14558)

FIX: Apply quote selection workaround to all browsers (#14558)

Firefox also needs this.

diff --git a/app/assets/javascripts/discourse/app/components/quote-button.js b/app/assets/javascripts/discourse/app/components/quote-button.js
index 783b0ab..50d3793 100644
--- a/app/assets/javascripts/discourse/app/components/quote-button.js
+++ b/app/assets/javascripts/discourse/app/components/quote-button.js
@@ -176,7 +176,7 @@ export default Component.extend(KeyEnterEscape, {
     // on Desktop, shows the button at the beginning of the selection
     // on Mobile, shows the button at the end of the selection
     const isMobileDevice = this.site.isMobileDevice;
-    const { isIOS, isAndroid, isSafari, isOpera } = this.capabilities;
+    const { isIOS, isAndroid, isOpera } = this.capabilities;
     const showAtEnd = isMobileDevice || isIOS || isAndroid || isOpera;
 
     // Don't mess with the original range as it results in weird behaviours
@@ -228,12 +228,10 @@ export default Component.extend(KeyEnterEscape, {
 
       this.element.querySelector("button")?.focus();
 
-      // work around Safari that would sometimes lose the selection
-      if (isSafari) {
-        this._reselected = true;
-        selection.removeAllRanges();
-        selection.addRange(clone);
-      }
+      // workaround so Safari and Firefox don't lose the selection
+      this._reselected = true;
+      selection.removeAllRanges();
+      selection.addRange(clone);
     });
   },
 

GitHub sha: 488f716c165517556a061de54868a14aeb6ca0a4

This commit appears in #14558 which was approved by CvX. It was merged by pmusaraj.