mirror of https://github.com/keeweb/keeweb
merge master
commit
3927d8b1ab
|
@ -1,3 +1,4 @@
|
|||
const Backbone = require('backbone');
|
||||
const FeatureDetector = require('../util/feature-detector');
|
||||
const Launcher = require('../comp/launcher');
|
||||
|
||||
|
@ -5,10 +6,14 @@ const FocusDetector = {
|
|||
init() {
|
||||
this.isFocused = true;
|
||||
this.detectsFocusWithEvents = !FeatureDetector.isDesktop && !FeatureDetector.isMobile;
|
||||
if (this.detectsFocusWithEvents) {
|
||||
window.onblur = () => { this.isFocused = false; };
|
||||
window.onfocus = () => { this.isFocused = true; };
|
||||
}
|
||||
window.onfocus = () => {
|
||||
this.isFocused = true;
|
||||
Backbone.trigger('focus');
|
||||
};
|
||||
window.onblur = () => {
|
||||
this.isFocused = false;
|
||||
Backbone.trigger('blur');
|
||||
};
|
||||
},
|
||||
|
||||
hasFocus() {
|
||||
|
|
|
@ -292,7 +292,7 @@ const Plugin = Backbone.Model.extend(_.extend({}, PluginStatus, {
|
|||
const locKey = this.getThemeLocaleKey(theme.name);
|
||||
SettingsManager.allThemes[theme.name] = locKey;
|
||||
BaseLocale[locKey] = theme.title;
|
||||
for (const styleSheet of document.styleSheets) {
|
||||
for (const styleSheet of Array.from(document.styleSheets)) {
|
||||
if (styleSheet.ownerNode.id === id) {
|
||||
this.processThemeStyleSheet(styleSheet, theme);
|
||||
break;
|
||||
|
@ -306,7 +306,7 @@ const Plugin = Backbone.Model.extend(_.extend({}, PluginStatus, {
|
|||
processThemeStyleSheet(styleSheet, theme) {
|
||||
const themeSelector = '.th-' + theme.name;
|
||||
const badSelectors = [];
|
||||
for (const rule of styleSheet.cssRules) {
|
||||
for (const rule of Array.from(styleSheet.cssRules)) {
|
||||
if (rule.selectorText && rule.selectorText.lastIndexOf(themeSelector, 0) !== 0) {
|
||||
badSelectors.push(rule.selectorText);
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ const OpenView = Backbone.View.extend({
|
|||
KeyHandler.onKey(Keys.DOM_VK_RETURN, this.enterKeyPress, this);
|
||||
KeyHandler.onKey(Keys.DOM_VK_DOWN, this.moveOpenFileSelectionDown, this);
|
||||
KeyHandler.onKey(Keys.DOM_VK_UP, this.moveOpenFileSelectionUp, this);
|
||||
this.listenTo(Backbone, 'focus', this.windowFocused.bind(this));
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
@ -105,10 +106,12 @@ const OpenView = Backbone.View.extend({
|
|||
return this;
|
||||
},
|
||||
|
||||
windowFocused: function() {
|
||||
this.inputEl.focus();
|
||||
},
|
||||
|
||||
focusInput: function() {
|
||||
console.log('focus');
|
||||
if (FocusDetector.hasFocus()) {
|
||||
console.log('hasFocus');
|
||||
this.inputEl.focus();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "KeeWeb",
|
||||
"version": "1.7.4",
|
||||
"version": "1.7.5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "KeeWeb",
|
||||
"version": "1.7.4",
|
||||
"version": "1.7.5",
|
||||
"description": "Free cross-platform password manager compatible with KeePass",
|
||||
"main": "main.js",
|
||||
"homepage": "https://keeweb.info",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "keeweb",
|
||||
"version": "1.7.4",
|
||||
"version": "1.7.5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "keeweb",
|
||||
"version": "1.7.4",
|
||||
"version": "1.7.5",
|
||||
"description": "Free cross-platform password manager compatible with KeePass",
|
||||
"main": "Gruntfile.js",
|
||||
"private": true,
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
Release notes
|
||||
-------------
|
||||
##### v1.7.5 (2019-02-04)
|
||||
`-` fix #1096: focus issues after minimizing
|
||||
`-` fix #1094: plugin installation in MS Edge
|
||||
|
||||
##### v1.7.4 (2019-01-17)
|
||||
`-` fix #423: input focus issues in desktop apps
|
||||
|
||||
|
|
Loading…
Reference in New Issue