mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-27 04:52:56 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user