cobrowse-agent-ui 1.2.0 → 1.2.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.2.1](https://github.com/cobrowseio/cobrowse-agent-ui/compare/v1.2.0...v1.2.1) (2025-08-05)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * retain focus when code entry is invalid ([#26](https://github.com/cobrowseio/cobrowse-agent-ui/issues/26)) ([505a429](https://github.com/cobrowseio/cobrowse-agent-ui/commit/505a429e9c297a0d162c9e1c7af6d2cd464a18f3))
11
+
5
12
  ## [1.2.0](https://github.com/cobrowseio/cobrowse-agent-ui/compare/v1.1.1...v1.2.0) (2025-05-09)
6
13
 
7
14
 
package/dist/CodeEntry.js CHANGED
@@ -83,14 +83,18 @@ var CodeEntry = /*#__PURE__*/function (_Component) {
83
83
  _this.setState({
84
84
  code: ['', '', '', '', '', '']
85
85
  });
86
- if (_this.firstDigit) _this.firstDigit.focus();
86
+ if (_this.firstDigit) setTimeout(function () {
87
+ return _this.firstDigit.focus();
88
+ }, 0);
87
89
  _context.next = 17;
88
90
  break;
89
91
  case 15:
90
92
  _this.setState({
91
93
  validating: false
92
94
  });
93
- if (_this.lastDigit) _this.lastDigit.focus();
95
+ if (_this.lastDigit) setTimeout(function () {
96
+ return _this.lastDigit.focus();
97
+ }, 0);
94
98
  case 17:
95
99
  _context.next = 24;
96
100
  break;
@@ -100,7 +104,9 @@ var CodeEntry = /*#__PURE__*/function (_Component) {
100
104
  _this.setState({
101
105
  validating: false
102
106
  });
103
- if (_this.lastDigit) _this.lastDigit.focus();
107
+ if (_this.lastDigit) setTimeout(function () {
108
+ return _this.lastDigit.focus();
109
+ }, 0);
104
110
  throw _context.t0;
105
111
  case 24:
106
112
  case "end":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cobrowse-agent-ui",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "scripts": {
5
5
  "start": "babel src --out-dir dist --watch --copy-files",
6
6
  "build": "rm -rf dist && babel src --out-dir dist --copy-files",