Skip to content

Commit e4fc7b2

Browse files
committed
fix playlist settings menu not closing when you click playlist search field
1 parent 2021500 commit e4fc7b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ui/elements/search/playlist.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class OBElementSearchPlaylist extends OBLitElement {
163163
@blur=${this._inputQueryDispatch}
164164
/>
165165
166-
<ob-element-button iconName="gear" .text="Settings" @click=${this._toggleSettings}></ob-element-button>
166+
<ob-element-button id="settingsButton" iconName="gear" .text="Settings" @click=${this._toggleSettings}></ob-element-button>
167167
168168
<div class="settings" ?hidden=${!this.settingsOpen}>
169169
<label><input type="checkbox" ?checked=${this.my} @change=${this._changeMy} /> My Playlists</label>
@@ -186,7 +186,9 @@ class OBElementSearchPlaylist extends OBLitElement {
186186
_clickOutsideMenu(e) {
187187
if (e.target == this) {
188188
const composedPath = e.composedPath();
189-
if (!this.renderRoot.querySelector(".settings").includes(e.target)) {
189+
const settings = this.renderRoot.querySelector(".settings");
190+
const settingsButton = this.renderRoot.querySelector("#settingsButton");
191+
if (!composedPath.includes(settings) && !composedPath.includes(settingsButton)) {
190192
this._closeSettings();
191193
}
192194
} else {

0 commit comments

Comments
 (0)