Update DisplaySearch.setContent/clearContent to close popups (#682)
This commit is contained in:
parent
d7aaab685e
commit
99f5655e53
@ -158,7 +158,13 @@ class DisplaySearch extends Display {
|
|||||||
|
|
||||||
async setContent(type, details) {
|
async setContent(type, details) {
|
||||||
this._query.blur();
|
this._query.blur();
|
||||||
await super.setContent(type, details);
|
this._closePopups();
|
||||||
|
return await super.setContent(type, details);
|
||||||
|
}
|
||||||
|
|
||||||
|
clearContent() {
|
||||||
|
this._closePopups();
|
||||||
|
return super.clearContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private
|
// Private
|
||||||
@ -244,7 +250,6 @@ class DisplaySearch extends Display {
|
|||||||
this.clearContent();
|
this.clearContent();
|
||||||
}
|
}
|
||||||
this._setTitleText(query);
|
this._setTitleText(query);
|
||||||
yomichan.trigger('closePopups');
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.onError(e);
|
this.onError(e);
|
||||||
}
|
}
|
||||||
@ -413,4 +418,8 @@ class DisplaySearch extends Display {
|
|||||||
|
|
||||||
await onOptionsUpdated();
|
await onOptionsUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_closePopups() {
|
||||||
|
yomichan.trigger('closePopups');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user