2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-06-23 05:50:33 +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
+8
View File
@@ -2,6 +2,14 @@
All notable changes to this project will be documented here. All notable changes to this project will be documented here.
<a name="3.4.2"></a>
## [3.4.2](https://github.com/rawilk/vue-context/releases/tag/3.4.2)
Released 2019-04-05
### Bug Fixes 3.4.2
- Only add scroll event listener on `closeOnScroll` prop value change if the menu is open.
<a name="3.4.1"></a> <a name="3.4.1"></a>
## [3.4.1](https://github.com/rawilk/vue-context/releases/tag/3.4.1) ## [3.4.1](https://github.com/rawilk/vue-context/releases/tag/3.4.1)
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -164,15 +164,15 @@
/** /**
* Add or remove the scroll event listener when the prop value changes. * Add or remove the scroll event listener when the prop value changes.
* *
* @param {boolean} value * @param {boolean} closeOnScroll
* @param {boolean} oldValue * @param {boolean} oldValue
*/ */
closeOnScroll (value, oldValue) { closeOnScroll (closeOnScroll, oldValue) {
if (value === oldValue) { if (closeOnScroll === oldValue) {
return; return;
} }
if (value) { if (closeOnScroll && this.show) {
this.addScrollEventListener(); this.addScrollEventListener();
} else { } else {
this.removeScrollEventListener(); this.removeScrollEventListener();
+1 -1
View File
File diff suppressed because one or more lines are too long