@momentum-design/components 0.135.0 → 0.135.1

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.
@@ -500,13 +500,16 @@ class SpatialNavigationProvider extends Provider {
500
500
  goBack() {
501
501
  const goBackElement = findFocusable(this.root).find(el => el.hasAttribute(DATA_ATTRIBUTES.GO_BACK));
502
502
  const isDefaultPrevented = this.emitGoBackEvent(goBackElement);
503
- if (goBackElement && !isDefaultPrevented) {
504
- goBackElement.click();
505
- return true;
506
- }
507
- if (window.history.length > this.initialHistoryLength) {
508
- window.history.back();
509
- return true;
503
+ // Skip default behavior when event was prevented by the user
504
+ if (!isDefaultPrevented) {
505
+ if (goBackElement) {
506
+ goBackElement.click();
507
+ return true;
508
+ }
509
+ if (window.history.length > this.initialHistoryLength) {
510
+ window.history.back();
511
+ return true;
512
+ }
510
513
  }
511
514
  return false;
512
515
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.135.0",
4
+ "version": "0.135.1",
5
5
  "engines": {
6
- "node": ">=20.0.0",
6
+ "node": ">=24.0.0",
7
7
  "npm": ">=8.0.0"
8
8
  },
9
9
  "main": "./dist/index.js",