File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ interface clickEvent extends MouseEvent {
77}
88
99export function useClick ( e : clickEvent ) : void {
10- const paths = e . path ;
10+ const paths = e . composedPath ( ) as HTMLElement [ ] ;
1111 for ( let i = 0 ; i < paths . length ; i ++ ) {
1212 const path = paths [ i ] ;
1313 if ( path . classList . contains ( `${ ns . b ( ) } -horizontal` ) ) {
Original file line number Diff line number Diff line change @@ -98,8 +98,7 @@ function getRoot(path: HTMLElement[]): HTMLElement {
9898function clearSelect_isHorizontal ( ele : HTMLElement , event : clickEvent ) {
9999 let element = event . target as HTMLElement ;
100100 let stack : Element [ ] = [ ] ;
101- const { path } = event ;
102- const root = getRoot ( path as HTMLElement [ ] ) ;
101+ const root = getRoot ( event . composedPath ( ) as HTMLElement [ ] ) ;
103102 stack = [ ...Array . from ( root . children ) ] as HTMLElement [ ] ;
104103 if ( element . tagName === 'SPAN' ) {
105104 element = element . parentElement as HTMLElement ;
You can’t perform that action at this time.
0 commit comments