fix: trigger missing callback parameters for some events

pull/77/merge
tangjinzhou 2018-07-11 17:47:26 +08:00
parent ce8d09c3b5
commit c0fb36468f
1 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ export default {
},
onPopupMouseleave (e) {
if (e.relatedTarget && !e.relatedTarget.setTimeout &&
if (e && e.relatedTarget && !e.relatedTarget.setTimeout &&
this._component &&
this._component.getPopupDomNode &&
contains(this._component.getPopupDomNode(), e.relatedTarget)) {
@ -525,7 +525,7 @@ export default {
} else {
newChildProps.on.focus = this.createTwoChains('focus')
newChildProps.on.blur = (e) => {
if (!e.relatedTarget || !contains(e.target, e.relatedTarget)) {
if (e && (!e.relatedTarget || !contains(e.target, e.relatedTarget))) {
this.createTwoChains('blur')(e)
}
}