@formio/js 5.0.0-dev.5857.f4bbbbf → 5.0.0-dev.5859.5c76cd6
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/dist/formio.form.js +2 -2
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/_classes/component/Component.js +2 -2
- package/lib/cjs/components/day/Day.js +0 -3
- package/lib/mjs/components/_classes/component/Component.js +2 -2
- package/lib/mjs/components/day/Day.js +0 -3
- package/package.json +1 -1
|
@@ -1757,12 +1757,12 @@ class Component extends Element_1.default {
|
|
|
1757
1757
|
var _a, _b, _c;
|
|
1758
1758
|
if ((_a = this.root) === null || _a === void 0 ? void 0 : _a.currentSelection) {
|
|
1759
1759
|
if ((_b = this.refs.input) === null || _b === void 0 ? void 0 : _b.length) {
|
|
1760
|
-
const {
|
|
1760
|
+
const { index } = this.root.currentSelection;
|
|
1761
1761
|
let input = this.refs.input[index];
|
|
1762
1762
|
const isInputRangeSelectable = (i) => /text|search|password|tel|url/i.test((i === null || i === void 0 ? void 0 : i.type) || '');
|
|
1763
1763
|
if (input) {
|
|
1764
1764
|
if (isInputRangeSelectable(input)) {
|
|
1765
|
-
input.setSelectionRange(
|
|
1765
|
+
input.setSelectionRange(input.value.length, input.value.length);
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
1768
|
else {
|
|
@@ -1720,12 +1720,12 @@ export default class Component extends Element {
|
|
|
1720
1720
|
restoreCaretPosition() {
|
|
1721
1721
|
if (this.root?.currentSelection) {
|
|
1722
1722
|
if (this.refs.input?.length) {
|
|
1723
|
-
const {
|
|
1723
|
+
const { index } = this.root.currentSelection;
|
|
1724
1724
|
let input = this.refs.input[index];
|
|
1725
1725
|
const isInputRangeSelectable = (i) => /text|search|password|tel|url/i.test(i?.type || '');
|
|
1726
1726
|
if (input) {
|
|
1727
1727
|
if (isInputRangeSelectable(input)) {
|
|
1728
|
-
input.setSelectionRange(
|
|
1728
|
+
input.setSelectionRange(input.value.length, input.value.length);
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
1731
|
else {
|