@descope/flow-components 3.22.2 → 3.22.3

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.
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.22.2",
8
+ "buildVersion": "3.22.3",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.22.2",
8
+ "buildVersion": "3.22.3",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -81924,6 +81924,13 @@ function requireIndex_cjs () {
81924
81924
  e.stopPropagation();
81925
81925
  }
81926
81926
  });
81927
+
81928
+ // The SDK submits the form (and prevents link activation) on any Enter that reaches the flow root
81929
+ this.contentNode?.addEventListener('keydown', (e) => {
81930
+ if (e.key === 'Enter' && e.target instanceof HTMLAnchorElement) {
81931
+ e.stopPropagation();
81932
+ }
81933
+ });
81927
81934
  }
81928
81935
 
81929
81936
  static get observedAttributes() {
@@ -97241,6 +97248,19 @@ function requireIndex_cjs () {
97241
97248
  this.baseElement._setFocused = this.setFocus.bind(this);
97242
97249
 
97243
97250
  this.initExternalInput();
97251
+ this.stopRevealButtonEnterPropagation();
97252
+ }
97253
+
97254
+ // Vaadin toggles visibility on Enter keydown but lets the event bubble,
97255
+ // and the SDK submits the form on any Enter that reaches the flow root.
97256
+ stopRevealButtonEnterPropagation() {
97257
+ this.revealButton.addEventListener('keydown', (e) => {
97258
+ if (e.key === 'Enter') e.stopPropagation();
97259
+ });
97260
+ }
97261
+
97262
+ get revealButton() {
97263
+ return this.baseElement.querySelector('vaadin-password-field-button');
97244
97264
  }
97245
97265
 
97246
97266
  initExternalInput() {
@@ -97296,9 +97316,7 @@ function requireIndex_cjs () {
97296
97316
  handlePasswordVisibility(externalInput) {
97297
97317
  // disable vaadin's `__boundRevealButtonMouseDown` mouse-down event lisetener
97298
97318
  const origBoundRevealButtonMouseDown = this.baseElement.__boundRevealButtonMouseDown;
97299
- this.baseElement
97300
- .querySelector('vaadin-password-field-button')
97301
- .removeEventListener('mousedown', origBoundRevealButtonMouseDown);
97319
+ this.revealButton.removeEventListener('mousedown', origBoundRevealButtonMouseDown);
97302
97320
 
97303
97321
  // disable vaadin's `_passwordVisibleChanged` observer
97304
97322
  this.baseElement._passwordVisibleChanged = () => {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.22.2",
3
+ "version": "3.22.3",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -98,7 +98,7 @@
98
98
  "webpack-subresource-integrity": "5.2.0-rc.1"
99
99
  },
100
100
  "dependencies": {
101
- "@descope/web-components-ui": "3.22.2"
101
+ "@descope/web-components-ui": "3.22.3"
102
102
  },
103
103
  "peerDependencies": {
104
104
  "react": ">= 18"