fix: trigger missing callback parameters for some events

pull/165/head
tangjinzhou 2018-07-11 17:47:26 +08:00
parent 2ff7471966
commit f5e10aabe4
1 changed files with 2 additions and 2 deletions

View File

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