mirror of https://github.com/keeweb/keeweb.git
bugfixes
This commit is contained in:
parent
12079f6ac6
commit
727887fb79
|
@ -152,11 +152,6 @@ class View extends EventEmitter {
|
|||
this.once('remove', () => model.off(event, boundCallback));
|
||||
}
|
||||
|
||||
stopListening(model, event, callback) {
|
||||
// TODO: remove a pending callback
|
||||
model.off(event, callback);
|
||||
}
|
||||
|
||||
hide() {
|
||||
Tip.hideTips(this.el);
|
||||
return this.toggle(false);
|
||||
|
|
|
@ -45,7 +45,6 @@ class FieldViewCustom extends FieldViewText {
|
|||
return;
|
||||
}
|
||||
delete this.input;
|
||||
this.stopListening(Backbone, 'click', this.fieldValueBlur);
|
||||
if (typeof newVal === 'string') {
|
||||
if (this.isProtected) {
|
||||
newVal = kdbxweb.ProtectedValue.fromString(newVal);
|
||||
|
|
|
@ -44,7 +44,7 @@ class FieldViewText extends FieldView {
|
|||
click: this.fieldValueInputClick.bind(this),
|
||||
mousedown: this.fieldValueInputMouseDown.bind(this)
|
||||
});
|
||||
this.listenTo(Backbone, 'click', this.fieldValueBlur);
|
||||
Backbone.on('click', this._fieldValueBlur);
|
||||
this.listenTo(Backbone, 'main-window-will-close user-idle', this.externalEndEdit);
|
||||
if (this.model.multiline) {
|
||||
this.setInputHeight();
|
||||
|
@ -217,10 +217,6 @@ class FieldViewText extends FieldView {
|
|||
super.endEdit(newVal, extra);
|
||||
}
|
||||
|
||||
stopBlurListener() {
|
||||
this.stopListening(Backbone, 'click main-window-will-close', this.fieldValueBlur);
|
||||
}
|
||||
|
||||
mobileFieldControlMouseDown(e) {
|
||||
e.stopPropagation();
|
||||
this.stopBlurListener();
|
||||
|
|
|
@ -99,9 +99,9 @@ class ListSearchView extends View {
|
|||
{ value: '-rank', icon: 'sort-amount-desc', loc: () => Locale.searchRank }
|
||||
];
|
||||
this.sortIcons = {};
|
||||
this.sortOptions.forEach(function(opt) {
|
||||
this.sortOptions.forEach(opt => {
|
||||
this.sortIcons[opt.value] = opt.icon;
|
||||
}, this);
|
||||
});
|
||||
this.advancedSearch = {
|
||||
user: true,
|
||||
other: true,
|
||||
|
@ -127,6 +127,10 @@ class ListSearchView extends View {
|
|||
this.listenTo(Backbone, 'filter', this.filterChanged);
|
||||
this.listenTo(Backbone, 'set-locale', this.setLocale);
|
||||
this.listenTo(Backbone, 'page-blur', this.pageBlur);
|
||||
|
||||
this.once('remove', () => {
|
||||
this.removeKeypressHandler();
|
||||
});
|
||||
}
|
||||
|
||||
setLocale() {
|
||||
|
@ -153,12 +157,16 @@ class ListSearchView extends View {
|
|||
this.inputEl.blur();
|
||||
}
|
||||
|
||||
removeKeypressHandler() {}
|
||||
|
||||
viewShown() {
|
||||
this.listenTo(KeyHandler, 'keypress', this.documentKeyPress);
|
||||
const keypressHandler = e => this.documentKeyPress(e);
|
||||
KeyHandler.on('keypress', keypressHandler);
|
||||
this.removeKeypressHandler = () => KeyHandler.off('keypress', keypressHandler);
|
||||
}
|
||||
|
||||
viewHidden() {
|
||||
this.stopListening(KeyHandler, 'keypress', this.documentKeyPress);
|
||||
this.removeKeypressHandler();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
Loading…
Reference in New Issue