@thi.ng/rdom 1.7.2 → 1.7.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-09-16T13:25:24Z
3
+ - **Last updated**: 2024-09-19T21:09:34Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,14 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [1.7.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@1.7.3) (2024-09-19)
13
+
14
+ #### 🩹 Bug fixes
15
+
16
+ - fix selection update in __updateValueAttrib() ([dada2de](https://github.com/thi-ng/umbrella/commit/dada2de))
17
+ - don't update selection (cursor pos) when updating disabled elements
18
+ - workaround for Safari focus issue
19
+
12
20
  ## [1.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/rdom@1.7.0) (2024-08-28)
13
21
 
14
22
  #### 🚀 Features
package/README.md CHANGED
@@ -315,7 +315,7 @@ Browser ESM import:
315
315
 
316
316
  [JSDelivr documentation](https://www.jsdelivr.com/)
317
317
 
318
- Package sizes (brotli'd, pre-treeshake): ESM: 4.28 KB
318
+ Package sizes (brotli'd, pre-treeshake): ESM: 4.27 KB
319
319
 
320
320
  ## Dependencies
321
321
 
package/dom.js CHANGED
@@ -156,7 +156,6 @@ const __setAttrib = (el, id, val, attribs) => {
156
156
  }
157
157
  };
158
158
  const __updateValueAttrib = (el, value) => {
159
- let ev;
160
159
  switch (el.type) {
161
160
  case "text":
162
161
  case "textarea":
@@ -165,10 +164,11 @@ const __updateValueAttrib = (el, value) => {
165
164
  case "number":
166
165
  case "url":
167
166
  case "tel":
168
- if ((ev = el.value) !== void 0 && isString(value)) {
169
- const off = value.length - (ev.length - (el.selectionStart || 0));
167
+ if (el.value !== void 0 && isString(value)) {
168
+ const start = el.selectionStart;
169
+ const end = el.selectionEnd;
170
170
  el.value = value;
171
- el.selectionStart = el.selectionEnd = off;
171
+ !el.disabled && el.setSelectionRange(start, end);
172
172
  break;
173
173
  }
174
174
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rdom",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "Lightweight, reactive, VDOM-less UI/DOM components with async lifecycle and @thi.ng/hiccup compatible",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,20 +37,20 @@
37
37
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
38
38
  },
39
39
  "dependencies": {
40
- "@thi.ng/api": "^8.11.9",
41
- "@thi.ng/checks": "^3.6.11",
42
- "@thi.ng/errors": "^2.5.15",
43
- "@thi.ng/hiccup": "^5.2.12",
44
- "@thi.ng/paths": "^5.1.89",
45
- "@thi.ng/prefixes": "^2.3.26",
46
- "@thi.ng/rstream": "^9.0.3",
47
- "@thi.ng/strings": "^3.8.4"
40
+ "@thi.ng/api": "^8.11.10",
41
+ "@thi.ng/checks": "^3.6.12",
42
+ "@thi.ng/errors": "^2.5.16",
43
+ "@thi.ng/hiccup": "^5.2.13",
44
+ "@thi.ng/paths": "^5.1.90",
45
+ "@thi.ng/prefixes": "^2.3.27",
46
+ "@thi.ng/rstream": "^9.0.4",
47
+ "@thi.ng/strings": "^3.8.5"
48
48
  },
49
49
  "devDependencies": {
50
- "@microsoft/api-extractor": "^7.47.5",
51
- "esbuild": "^0.23.0",
52
- "typedoc": "^0.26.5",
53
- "typescript": "^5.5.4"
50
+ "@microsoft/api-extractor": "^7.47.9",
51
+ "esbuild": "^0.23.1",
52
+ "typedoc": "^0.26.7",
53
+ "typescript": "^5.6.2"
54
54
  },
55
55
  "keywords": [
56
56
  "async",
@@ -146,5 +146,5 @@
146
146
  ],
147
147
  "year": 2020
148
148
  },
149
- "gitHead": "8335e9571c2b9b13844ee4d8d24f99143c5f8816\n"
149
+ "gitHead": "b52baa3750ddd1256892df966ab7ac9b4806a9ef\n"
150
150
  }