hr-design-system-handlebars 0.49.8 → 0.49.9

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,15 @@
1
+ # v0.49.9 (Fri Jul 08 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - adds detection for scrollbar use [#266](https://github.com/mumprod/hr-design-system-handlebars/pull/266) ([@StefanVesper](https://github.com/StefanVesper))
6
+
7
+ #### Authors: 1
8
+
9
+ - SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
10
+
11
+ ---
12
+
1
13
  # v0.49.8 (Thu Jul 07 2022)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -39,7 +39,18 @@ document.addEventListener('alpine:init', () => {
39
39
  function mouseEvent(e) {
40
40
  userScroll = true;
41
41
  window.userScroll = true;
42
+ console.log('user action detected')
42
43
  }
44
+
45
+ const clickedOnScrollbar = mouseX => {
46
+ return document.documentElement.offsetWidth <= mouseX ? true : false;
47
+ }
48
+
49
+ const mouseDownHandler = (e) => {
50
+ clickedOnScrollbar(e.clientX) ? mouseEvent() : null
51
+ };
52
+
53
+ window.addEventListener('mousedown', mouseDownHandler, false)
43
54
  window.addEventListener('wheel', mouseEvent, false);
44
55
  window.addEventListener('touchmove', mouseEvent, false)
45
56
 
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
8
8
  "repository": "https://github.com/szuelch/hr-design-system-handlebars",
9
- "version": "0.49.8",
9
+ "version": "0.49.9",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "start-storybook -p 6006 public",
@@ -39,7 +39,18 @@ document.addEventListener('alpine:init', () => {
39
39
  function mouseEvent(e) {
40
40
  userScroll = true;
41
41
  window.userScroll = true;
42
+ console.log('user action detected')
42
43
  }
44
+
45
+ const clickedOnScrollbar = mouseX => {
46
+ return document.documentElement.offsetWidth <= mouseX ? true : false;
47
+ }
48
+
49
+ const mouseDownHandler = (e) => {
50
+ clickedOnScrollbar(e.clientX) ? mouseEvent() : null
51
+ };
52
+
53
+ window.addEventListener('mousedown', mouseDownHandler, false)
43
54
  window.addEventListener('wheel', mouseEvent, false);
44
55
  window.addEventListener('touchmove', mouseEvent, false)
45
56