Skip to content

Commit

Permalink
fix: clickoutside event listener change capturing to bubbling
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxiong10 committed Jan 24, 2019
1 parent 479fb8f commit 054758e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/directives/clickoutside.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export default {
binding.value()
}
}
document.addEventListener('click', el['@clickoutside'], true)
document.addEventListener('click', el['@clickoutside'], false)
},
unbind (el) {
document.removeEventListener('click', el['@clickoutside'], true)
document.removeEventListener('click', el['@clickoutside'], false)
}
}
2 changes: 1 addition & 1 deletion src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}"
v-clickoutside="closePopup">
<div class="mx-input-wrapper"
@click="showPopup">
@click.stop="showPopup">
<input
:class="inputClass"
:name="inputName"
Expand Down

0 comments on commit 054758e

Please sign in to comment.