mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Fix Firefox quick bar issue by allowing Ctrl+P to toggle modes (#7413)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
3c4b0d4a74
commit
bcf405bf9d
@ -68,7 +68,7 @@ export class QuickBar extends LitElement {
|
||||
private _focusSet = false;
|
||||
|
||||
public async showDialog(params: QuickBarParams) {
|
||||
this._commandMode = params.commandMode || false;
|
||||
this._commandMode = params.commandMode || this._toggleIfAlreadyOpened();
|
||||
this._commandItems = this._generateCommandItems();
|
||||
this._entityItems = this._generateEntityItems();
|
||||
this._opened = true;
|
||||
@ -305,6 +305,10 @@ export class QuickBar extends LitElement {
|
||||
.sort((a, b) => compare(a.text.toLowerCase(), b.text.toLowerCase()));
|
||||
}
|
||||
|
||||
private _toggleIfAlreadyOpened() {
|
||||
return this._opened ? !this._commandMode : false;
|
||||
}
|
||||
|
||||
private _setFilteredItems() {
|
||||
const items = this._commandMode ? this._commandItems : this._entityItems;
|
||||
this._items = this._filter
|
||||
|
Loading…
x
Reference in New Issue
Block a user