mirror of https://github.com/keeweb/keeweb.git
fix #636: workaround to make clicks work in Edge 14
This commit is contained in:
parent
bacb65b584
commit
99ef3f2b43
|
@ -9,6 +9,7 @@ const FeatureDetector = {
|
|||
isPopup: !!((window.parent !== window.top) || window.opener),
|
||||
isStandalone: !!navigator.standalone,
|
||||
isBeta: window.location.href.toLowerCase().indexOf('beta.') > 0,
|
||||
needFixClicks: /Edge\/14/.test(navigator.appVersion),
|
||||
|
||||
actionShortcutSymbol: function(formatting) {
|
||||
return this.isMac ? '⌘' : formatting ? '<span class="thin">ctrl + </span>' : 'ctrl-';
|
||||
|
|
|
@ -98,6 +98,7 @@ const AppView = Backbone.View.extend({
|
|||
setInterval(this.syncAllByTimer.bind(this), Timeouts.AutoSync);
|
||||
|
||||
this.setWindowClass();
|
||||
this.fixClicksInEdge();
|
||||
},
|
||||
|
||||
setWindowClass: function() {
|
||||
|
@ -110,6 +111,18 @@ const AppView = Backbone.View.extend({
|
|||
}
|
||||
},
|
||||
|
||||
fixClicksInEdge: function() {
|
||||
// MS Edge doesn't want to handle clicks by default
|
||||
// TODO: remove once Edge 14 share drops enough
|
||||
// https://github.com/keeweb/keeweb/issues/636
|
||||
// https://github.com/keeweb/keeweb/issues/636#issuecomment-304225634
|
||||
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/5782378/
|
||||
if (FeatureDetector.needFixClicks) {
|
||||
const msEdgeScrewer = $('<input/>').appendTo(this.$el).focus();
|
||||
msEdgeScrewer.remove();
|
||||
}
|
||||
},
|
||||
|
||||
render: function () {
|
||||
this.$el.html(this.template({
|
||||
beta: this.model.isBeta,
|
||||
|
@ -277,6 +290,7 @@ const AppView = Backbone.View.extend({
|
|||
} else {
|
||||
this.showOpenFile();
|
||||
}
|
||||
this.fixClicksInEdge();
|
||||
},
|
||||
|
||||
showFileSettings: function(e) {
|
||||
|
|
Loading…
Reference in New Issue