@cocreate/scroll 1.13.2 → 1.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.13.4](https://github.com/CoCreate-app/CoCreate-scroll/compare/v1.13.3...v1.13.4) (2025-09-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * improve scroll event handling by adding checks for values before updating attributes ([6411e3c](https://github.com/CoCreate-app/CoCreate-scroll/commit/6411e3cfed01ce2d135352a1b31b090b067a90e2))
7
+
8
+ ## [1.13.3](https://github.com/CoCreate-app/CoCreate-scroll/compare/v1.13.2...v1.13.3) (2025-05-01)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update [@cocreate](https://github.com/cocreate) dependencies ([6e9e160](https://github.com/CoCreate-app/CoCreate-scroll/commit/6e9e1602133c73b5eac9d28dd5c16f545abd25f6))
14
+
1
15
  ## [1.13.2](https://github.com/CoCreate-app/CoCreate-scroll/compare/v1.13.1...v1.13.2) (2025-04-30)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,18 +1,10 @@
1
1
  {
2
2
  "name": "@cocreate/scroll",
3
- "version": "1.13.2",
3
+ "version": "1.13.4",
4
4
  "description": "A simple scroll component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "scroll",
7
- "cocreate",
8
- "low-code-framework",
9
- "no-code-framework",
10
- "cocreatejs",
11
- "cocreatejs-component",
12
- "cocreate-framework",
13
- "no-code",
14
7
  "low-code",
15
- "collaborative-framework",
16
8
  "realtime",
17
9
  "realtime-framework",
18
10
  "collaboration",
@@ -54,7 +46,7 @@
54
46
  "webpack-log": "^3.0.1"
55
47
  },
56
48
  "dependencies": {
57
- "@cocreate/observer": "^1.18.0",
58
- "@cocreate/actions": "^1.21.0"
49
+ "@cocreate/observer": "^1.18.1",
50
+ "@cocreate/actions": "^1.21.1"
59
51
  }
60
52
  }
package/src/index.js CHANGED
@@ -198,7 +198,7 @@ const CoCreateScroll = {
198
198
  } = info;
199
199
 
200
200
  let newTime = new Date().getTime();
201
- if (!info.datetime || newTime - info.datetime > 200) {
201
+ if ((values && !info.datetime) || newTime - info.datetime > 200) {
202
202
  info["datetime"] = newTime;
203
203
 
204
204
  if (upSize <= currentPos - scrollY) {
@@ -212,9 +212,10 @@ const CoCreateScroll = {
212
212
 
213
213
  //. scroll top case
214
214
  if (scrollY <= this.delta) {
215
- this.__removeAttrbuteValue(element, attrName, values[0]);
216
- this.__removeAttrbuteValue(element, attrName, values[1]);
217
-
215
+ if (values) {
216
+ this.__removeAttrbuteValue(element, attrName, values[0]);
217
+ this.__removeAttrbuteValue(element, attrName, values[1]);
218
+ }
218
219
  this.__addAttributeValue(element, attrName, scrollTop);
219
220
  } else {
220
221
  this.__removeAttrbuteValue(element, attrName, scrollTop);