Skip to content

Commit

Permalink
fix: In shadow DOM, The target obtained is shadowRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
fengpingping committed Sep 5, 2024
1 parent 07389db commit b2dbe97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/SelectInput/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ class SelectInput extends Element implements IBindable, IFocusable {
};

protected _onWindowMouseDown = (evt: MouseEvent) => {
if (!this.dom.contains(evt.target as Node)) {
if (!this.dom.contains(evt.composedPath()[0] as Node)) {
this.close();
}
};
Expand Down

0 comments on commit b2dbe97

Please sign in to comment.