vanduo-framework 1.2.1 → 1.2.2

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.
@@ -98,17 +98,20 @@
98
98
  cleanupFunctions.push(() => element.removeEventListener('touchstart', touchStartHandler));
99
99
 
100
100
  // Handle touch move (for mobile)
101
+ // { passive: false } is required so that e.preventDefault() works
102
+ // once the drag threshold is reached — without it, modern browsers
103
+ // treat the listener as passive and silently ignore preventDefault().
101
104
  const touchMoveHandler = (e) => {
102
105
  this.handleTouchMove(e, element);
103
106
  };
104
- element.addEventListener('touchmove', touchMoveHandler);
107
+ element.addEventListener('touchmove', touchMoveHandler, { passive: false });
105
108
  cleanupFunctions.push(() => element.removeEventListener('touchmove', touchMoveHandler));
106
109
 
107
110
  // Handle touch end (for mobile)
108
111
  const touchEndHandler = (e) => {
109
112
  this.handleTouchEnd(e, element);
110
113
  };
111
- element.addEventListener('touchend', touchEndHandler);
114
+ element.addEventListener('touchend', touchEndHandler, { passive: false });
112
115
  cleanupFunctions.push(() => element.removeEventListener('touchend', touchEndHandler));
113
116
 
114
117
  // Handle touch cancel (for mobile)
@@ -390,7 +393,7 @@
390
393
  // Only start dragging if moved a minimum distance
391
394
  if (Math.abs(deltaX) > 10 || Math.abs(deltaY) > 10) {
392
395
  // Now we know it's a drag, not a scroll — prevent default
393
- e.preventDefault();
396
+ if (e.cancelable) e.preventDefault();
394
397
 
395
398
  if (!this.touchState.isDragging) {
396
399
  this.touchState.isDragging = true;
@@ -447,7 +450,7 @@
447
450
  */
448
451
  handleTouchEnd: function (e, element) {
449
452
  if (this.touchState && this.touchState.isDragging) {
450
- e.preventDefault();
453
+ if (e.cancelable) e.preventDefault();
451
454
 
452
455
  element.classList.remove('is-dragging');
453
456
  element.classList.add('is-dropped');
package/js/vanduo.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Vanduo Framework - Main JavaScript File
3
- * v1.2.1
3
+ * v1.2.2
4
4
  */
5
5
 
6
6
  (function () {
@@ -10,7 +10,7 @@
10
10
  * Vanduo Framework Object
11
11
  */
12
12
  const Vanduo = {
13
- version: '1.2.1',
13
+ version: '1.2.2',
14
14
  components: {},
15
15
 
16
16
  /**
@@ -51,7 +51,7 @@
51
51
  }
52
52
  });
53
53
 
54
- console.log('Vanduo Framework v1.2.1 initialized');
54
+ console.log('Vanduo Framework v1.2.2 initialized');
55
55
  },
56
56
 
57
57
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanduo-framework",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Zero-dependency CSS/JS framework built on Fibonacci/Golden Ratio design system with Open Color integration",
5
5
  "keywords": [
6
6
  "css",