Skip to content

A platform for community discussion. Free, open, simple.

UX: show quote button at end of selection on Opera

Régis Hanolf93ba5694e46
diff --git a/app/assets/javascripts/discourse/components/quote-button.js.es6 b/app/assets/javascripts/discourse/components/quote-button.js.es6
index 49ee520e95a..e48f3b327f4 100644
--- a/app/assets/javascripts/discourse/components/quote-button.js.es6
+++ b/app/assets/javascripts/discourse/components/quote-button.js.es6
@@ -55,8 +55,8 @@ export default Ember.Component.extend({
// 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 } = this.capabilities;
- const showAtEnd = isMobileDevice || isIOS || isAndroid;
+ const { isIOS, isAndroid, isSafari, isOpera } = this.capabilities;
+ const showAtEnd = isMobileDevice || isIOS || isAndroid || isOpera;
// Don't mess with the original range as it results in weird behaviours
// where certain browsers will deselect the selection
diff --git a/app/assets/javascripts/discourse/pre-initializers/sniff-capabilities.js.es6 b/app/assets/javascripts/discourse/pre-initializers/sniff-capabilities.js.es6
index 50bd993956b..c234b292350 100644
--- a/app/assets/javascripts/discourse/pre-initializers/sniff-capabilities.js.es6
+++ b/app/assets/javascripts/discourse/pre-initializers/sniff-capabilities.js.es6
@@ -22,6 +22,7 @@ export default {
caps.isFirefox = typeof InstallTrigger !== 'undefined';
caps.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || safari.pushNotification);
caps.isChrome = !!window.chrome && !caps.isOpera;
+
caps.canPasteImages = caps.isChrome || caps.isFirefox;
}