@adminforth/two-factors-auth 1.8.9 → 1.8.10

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/build.log CHANGED
@@ -11,5 +11,5 @@ custom/package-lock.json
11
11
  custom/package.json
12
12
  custom/tsconfig.json
13
13
 
14
- sent 31,500 bytes received 134 bytes 63,268.00 bytes/sec
15
- total size is 31,002 speedup is 0.98
14
+ sent 31,567 bytes received 134 bytes 63,402.00 bytes/sec
15
+ total size is 31,076 speedup is 0.98
@@ -80,13 +80,16 @@
80
80
  function tagOtpInputs() {
81
81
  const root = otpRoot.value;
82
82
  if (!root) return;
83
- root.querySelectorAll('input.otp-input').forEach((el, idx) => {
83
+ const inputs = root.querySelectorAll('input.otp-input');
84
+ inputs.forEach((el, idx) => {
84
85
  el.setAttribute('name', 'mfaCode');
85
86
  el.setAttribute('id', `mfaCode-${idx + 1}`);
86
87
  el.setAttribute('autocomplete', 'one-time-code');
87
88
  el.setAttribute('inputmode', 'numeric');
88
89
  el.setAttribute('aria-labelledby', 'mfaCode-label');
89
90
  });
91
+ (inputs[0] as HTMLInputElement)?.focus();
92
+
90
93
  }
91
94
 
92
95
  function handlePaste(event: ClipboardEvent) {
@@ -80,13 +80,16 @@
80
80
  function tagOtpInputs() {
81
81
  const root = otpRoot.value;
82
82
  if (!root) return;
83
- root.querySelectorAll('input.otp-input').forEach((el, idx) => {
83
+ const inputs = root.querySelectorAll('input.otp-input');
84
+ inputs.forEach((el, idx) => {
84
85
  el.setAttribute('name', 'mfaCode');
85
86
  el.setAttribute('id', `mfaCode-${idx + 1}`);
86
87
  el.setAttribute('autocomplete', 'one-time-code');
87
88
  el.setAttribute('inputmode', 'numeric');
88
89
  el.setAttribute('aria-labelledby', 'mfaCode-label');
89
90
  });
91
+ (inputs[0] as HTMLInputElement)?.focus();
92
+
90
93
  }
91
94
 
92
95
  function handlePaste(event: ClipboardEvent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/two-factors-auth",
3
- "version": "1.8.9",
3
+ "version": "1.8.10",
4
4
  "description": "AdminForth plugin for two factors authentication",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",