2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-12 13:22:24 +03:00

Close on scroll bug (#18)

This commit is contained in:
Randall Wilk
2019-04-05 21:41:21 -05:00
committed by GitHub
parent fe54e62380
commit d3b8f915f0
4 changed files with 14 additions and 6 deletions
+4 -4
View File
@@ -164,15 +164,15 @@
/**
* Add or remove the scroll event listener when the prop value changes.
*
* @param {boolean} value
* @param {boolean} closeOnScroll
* @param {boolean} oldValue
*/
closeOnScroll (value, oldValue) {
if (value === oldValue) {
closeOnScroll (closeOnScroll, oldValue) {
if (closeOnScroll === oldValue) {
return;
}
if (value) {
if (closeOnScroll && this.show) {
this.addScrollEventListener();
} else {
this.removeScrollEventListener();