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:
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+4
-4
@@ -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();
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user