fix #636: broken layout in edge 15

This commit is contained in:
antelle 2017-05-25 21:37:04 +02:00
parent eafc81c938
commit 4634281870
4 changed files with 15 additions and 3 deletions

View File

@ -46,6 +46,15 @@ const FeatureDetector = {
throw 'localStorage not available';
}
}
},
getBrowserCssClass: function() {
if (window.chrome && window.chrome.webstore) {
return 'chrome';
}
if (window.navigator.userAgent.indexOf('Edge/') > -1) {
return 'edge';
}
return '';
}
};

View File

@ -20,6 +20,7 @@ const IdleTracker = require('../comp/idle-tracker');
const Launcher = require('../comp/launcher');
const SettingsManager = require('../comp/settings-manager');
const Locale = require('../util/locale');
const FeatureDetector = require('../util/feature-detector');
const UpdateModel = require('../models/update-model');
const AppView = Backbone.View.extend({
@ -100,8 +101,9 @@ const AppView = Backbone.View.extend({
},
setWindowClass: function() {
if (window.chrome && window.chrome.webstore) {
this.$el.addClass('chrome');
const getBrowserCssClass = FeatureDetector.getBrowserCssClass();
if (getBrowserCssClass) {
this.$el.addClass(getBrowserCssClass);
}
},

View File

@ -81,7 +81,7 @@ img {
font-weight: 200;
}
* {
body:not(.edge) * {
@include selection(true) {
@include th {
background-color: th(text-selection-bg-color);

View File

@ -2,6 +2,7 @@ Release notes
-------------
##### v1.5.3 (TBD)
`-` fix #638: password generator drag issues
`-` fix #636: broken layout in edge 15
##### v1.5.2 (2017-05-25)
`-` fix #633: template ids issues