Skip to content

Commit f5e10aa

Browse files
committed
fix: trigger missing callback parameters for some events
1 parent 2ff7471 commit f5e10aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/trigger/Trigger.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default {
171171
},
172172

173173
onPopupMouseleave (e) {
174-
if (e.relatedTarget && !e.relatedTarget.setTimeout &&
174+
if (e && e.relatedTarget && !e.relatedTarget.setTimeout &&
175175
this._component &&
176176
this._component.getPopupDomNode &&
177177
contains(this._component.getPopupDomNode(), e.relatedTarget)) {
@@ -525,7 +525,7 @@ export default {
525525
} else {
526526
newChildProps.on.focus = this.createTwoChains('focus')
527527
newChildProps.on.blur = (e) => {
528-
if (!e.relatedTarget || !contains(e.target, e.relatedTarget)) {
528+
if (e && (!e.relatedTarget || !contains(e.target, e.relatedTarget))) {
529529
this.createTwoChains('blur')(e)
530530
}
531531
}

0 commit comments

Comments
 (0)