mirror of
https://github.com/tenrok/vue-context.git
synced 2026-06-06 13:32:23 +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.
|
||||
|
||||
<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>
|
||||
## [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.
|
||||
*
|
||||
* @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();
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user