Skip to content

Commit c885f81

Browse files
committed
fix: handle click outside inspector overlay correctly when pinned
1 parent 686387b commit c885f81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/view/frontend/web/js/inspector/picker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export const pickerMethods = {
153153
// Handle click outside badge when pinned
154154
if (this.isPinned && this.infoBadge) {
155155
// Check if click is outside badge
156-
if (!this.infoBadge.contains(e.target) && !this.floatingButton.contains(e.target)) {
156+
if (!this.infoBadge.contains(e.target) && (!this.floatingButton || !this.floatingButton.contains(e.target))) {
157157
this.unpinBadge();
158158
return;
159159
}

0 commit comments

Comments
 (0)