@creative-web-solution/front-library 7.1.57 → 7.1.58

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,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 7.1.58
4
+
5
+ - [Popin]: Fix trap focus bug
6
+
3
7
  ## 7.1.57
4
8
 
5
9
  - [KeyboardHandler]: Handle onHome and onEnd callbak. Set onNext as RIGHT or DOWN and onPrevious as LEFT or UP.
@@ -47,8 +47,8 @@ export default class PopinAccessibility {
47
47
 
48
48
  refresh(): void {
49
49
  this.#addSentinels();
50
- this.#handleFocusBackInDocument();
51
50
  this.#getFocusableElements();
51
+ this.#handleFocusBackInDocument();
52
52
  }
53
53
 
54
54
  #getFocusableElements(): void {
@@ -56,7 +56,7 @@ export default class PopinAccessibility {
56
56
  this.#$popin.querySelectorAll<HTMLElement>(
57
57
  FOCUSABLE_ELEMENTS_SELECTOR,
58
58
  ),
59
- ).filter(($element) => $element.offsetParent !== null);
59
+ ).filter(($element) => $element.offsetParent !== null && $element !== this.#$startSentinel && $element !== this.#$endSentinel);
60
60
  this.#$firstElement = this.#$elements[0] ?? this.#$popin;
61
61
  this.#$lastElement = this.#$elements[this.#$elements.length - 1];
62
62
  }
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Front Library
2
2
 
3
- @version: 7.1.57
3
+ @version: 7.1.58
4
4
 
5
5
 
6
6
  ## Use
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@creative-web-solution/front-library",
3
3
  "title": "Frontend library",
4
4
  "description": "Frontend functions and modules",
5
- "version": "7.1.57",
5
+ "version": "7.1.58",
6
6
  "homepage": "https://github.com/creative-web-solution/front-library",
7
7
  "author": "Creative Web Solution <contact@cws-studio.com> (https://www.cws-studio.com)",
8
8
  "keywords": [],