UX: show quote button at end of selection on Opera

This commit is contained in:
Régis Hanol 2018-06-13 11:07:19 +02:00
parent 4e0c06a0b1
commit f93ba5694e
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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;
}