Skip to content

Commit c428aea

Browse files
committed
fix(menu-surface): do not close menu when viewport is resized
fix: Lundalogik/crm-feature#4408
1 parent 5f1ecd5 commit c428aea

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/components/menu-surface/menu-surface.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ export class MenuSurface {
9090
capture: true,
9191
});
9292
this.host.addEventListener('keydown', this.handleKeyDown);
93-
window.addEventListener('resize', this.handleResize, {
94-
passive: true,
95-
});
9693
};
9794

9895
private teardown = () => {
@@ -101,7 +98,6 @@ export class MenuSurface {
10198
capture: true,
10299
});
103100
this.host.removeEventListener('keydown', this.handleKeyDown);
104-
window.removeEventListener('resize', this.handleResize);
105101
};
106102

107103
private handleDocumentClick = (event) => {
@@ -129,12 +125,6 @@ export class MenuSurface {
129125
this.preventClickEventPropagation();
130126
};
131127

132-
private handleResize = () => {
133-
if (this.open) {
134-
this.dismiss.emit();
135-
}
136-
};
137-
138128
private preventClickEventPropagation = () => {
139129
// When the menu surface is open, we want to stop the `click` event from propagating
140130
// when clicking outside the surface itself. This is to prevent any dialog that might

0 commit comments

Comments
 (0)