Skip to content

Commit

Permalink
fix: In shadow DOM, the target obtained is shadowRoot (#359)
Browse files Browse the repository at this point in the history
Co-authored-by: fengpingping <fengpingping@hikvision.com.cn>
  • Loading branch information
missingtears and fengpingping authored Sep 6, 2024
1 parent 07389db commit cc58b94
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 cc58b94

Please # to comment.