mirror of
https://github.com/keeweb/keeweb.git
synced 2024-06-25 07:37:46 +02:00
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),
|
isPopup: !!((window.parent !== window.top) || window.opener),
|
||||||
isStandalone: !!navigator.standalone,
|
isStandalone: !!navigator.standalone,
|
||||||
isBeta: window.location.href.toLowerCase().indexOf('beta.') > 0,
|
isBeta: window.location.href.toLowerCase().indexOf('beta.') > 0,
|
||||||
|
needFixClicks: /Edge\/14/.test(navigator.appVersion),
|
||||||
|
|
||||||
actionShortcutSymbol: function(formatting) {
|
actionShortcutSymbol: function(formatting) {
|
||||||
return this.isMac ? '⌘' : formatting ? '<span class="thin">ctrl + </span>' : 'ctrl-';
|
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);
|
setInterval(this.syncAllByTimer.bind(this), Timeouts.AutoSync);
|
||||||
|
|
||||||
this.setWindowClass();
|
this.setWindowClass();
|
||||||
|
this.fixClicksInEdge();
|
||||||
},
|
},
|
||||||
|
|
||||||
setWindowClass: function() {
|
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 () {
|
render: function () {
|
||||||
this.$el.html(this.template({
|
this.$el.html(this.template({
|
||||||
beta: this.model.isBeta,
|
beta: this.model.isBeta,
|
||||||
|
@ -277,6 +290,7 @@ const AppView = Backbone.View.extend({
|
||||||
} else {
|
} else {
|
||||||
this.showOpenFile();
|
this.showOpenFile();
|
||||||
}
|
}
|
||||||
|
this.fixClicksInEdge();
|
||||||
},
|
},
|
||||||
|
|
||||||
showFileSettings: function(e) {
|
showFileSettings: function(e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user