File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,14 @@ export default function onTouchMove(event) {
76
76
return ;
77
77
}
78
78
}
79
-
79
+ if (
80
+ document . activeElement &&
81
+ document . activeElement . matches ( data . focusableElements ) &&
82
+ document . activeElement !== e . target &&
83
+ e . pointerType !== 'mouse'
84
+ ) {
85
+ document . activeElement . blur ( ) ;
86
+ }
80
87
if ( document . activeElement ) {
81
88
if ( e . target === document . activeElement && e . target . matches ( data . focusableElements ) ) {
82
89
data . isMoved = true ;
Original file line number Diff line number Diff line change @@ -134,10 +134,13 @@ export default function onTouchStart(event) {
134
134
data . isTouched = false ;
135
135
}
136
136
}
137
+
137
138
if (
138
139
document . activeElement &&
139
140
document . activeElement . matches ( data . focusableElements ) &&
140
- document . activeElement !== targetEl
141
+ document . activeElement !== targetEl &&
142
+ ( e . pointerType === 'mouse' ||
143
+ ( e . pointerType !== 'mouse' && ! targetEl . matches ( data . focusableElements ) ) )
141
144
) {
142
145
document . activeElement . blur ( ) ;
143
146
}
You can’t perform that action at this time.
0 commit comments