@adobe/helix-rum-enhancer 2.26.3 → 2.26.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/.releaserc.cjs CHANGED
@@ -7,7 +7,7 @@ module.exports = {
7
7
  }],
8
8
  "@semantic-release/npm",
9
9
  ["@semantic-release/git", {
10
- "assets": ["package.json", "CHANGELOG.md"],
10
+ "assets": ["package.json", "package-lock.json", "CHANGELOG.md"],
11
11
  "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
12
12
  }],
13
13
  ["@semantic-release/github", {
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.26.4](https://github.com/adobe/helix-rum-enhancer/compare/v2.26.3...v2.26.4) (2024-12-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * release process ([bdce5c3](https://github.com/adobe/helix-rum-enhancer/commit/bdce5c328037630347f6bc96b64f097c983418e0))
7
+
1
8
  ## [2.26.3](https://github.com/adobe/helix-rum-enhancer/compare/v2.26.2...v2.26.3) (2024-12-16)
2
9
 
3
10
 
package/modules/index.js CHANGED
@@ -251,11 +251,21 @@ function addViewMediaTracking(parent) {
251
251
  }
252
252
  }
253
253
 
254
+ function addFocusTracking(parent) {
255
+ parent.addEventListener('focusin', (event) => {
256
+ if (['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON'].includes(event.target.tagName)
257
+ || event.target.getAttribute('contenteditable') === 'true') {
258
+ sampleRUM('click', { source: sourceSelector(event.target) });
259
+ }
260
+ });
261
+ }
262
+
254
263
  function addFormTracking(parent) {
255
264
  activateBlocksMO();
256
265
  activateMediaMO();
257
266
  parent.querySelectorAll('form').forEach((form) => {
258
267
  form.addEventListener('submit', (e) => sampleRUM('formsubmit', { target: targetSelector(e.target), source: sourceSelector(e.target) }), { once: true });
268
+ addFocusTracking(form);
259
269
  });
260
270
  }
261
271
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-rum-enhancer",
3
- "version": "2.26.3",
3
+ "version": "2.26.4",
4
4
  "description": "Helix RUM Enhancer",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -384,11 +384,20 @@
384
384
  });
385
385
  }
386
386
  }
387
+ function addFocusTracking(parent) {
388
+ parent.addEventListener('focusin', (event) => {
389
+ if (['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON'].includes(event.target.tagName)
390
+ || event.target.getAttribute('contenteditable') === 'true') {
391
+ sampleRUM('click', { source: sourceSelector(event.target) });
392
+ }
393
+ });
394
+ }
387
395
  function addFormTracking(parent) {
388
396
  activateBlocksMO();
389
397
  activateMediaMO();
390
398
  parent.querySelectorAll('form').forEach((form) => {
391
399
  form.addEventListener('submit', (e) => sampleRUM('formsubmit', { target: targetSelector(e.target), source: sourceSelector(e.target) }), { once: true });
400
+ addFocusTracking(form);
392
401
  });
393
402
  }
394
403
  function addObserver(ck, fn, block) {
package/src/index.md5 CHANGED
@@ -1 +1 @@
1
- 6562b464055f9498b72eab295021c297
1
+ 80a42e2816eebe0efae335ce49fe1225