@orion-studios/payload-studio 0.6.0-beta.167 → 0.6.0-beta.168
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.
|
@@ -1415,7 +1415,8 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1415
1415
|
const selectionStart2 = input.selectionStart ?? 0;
|
|
1416
1416
|
const selectionEnd2 = input.selectionEnd ?? selectionStart2;
|
|
1417
1417
|
const value2 = input.dataset.orionPaddingDraft || input.value || "";
|
|
1418
|
-
const
|
|
1418
|
+
const displayedValue = input.value || "";
|
|
1419
|
+
const isReplacingAll = selectionStart2 === 0 && (selectionEnd2 === value2.length || selectionEnd2 === displayedValue.length);
|
|
1419
1420
|
const isNegativeEntry = value2.startsWith("-") || Boolean(input.dataset.orionPaddingDraft?.startsWith("-")) || event.key === "-";
|
|
1420
1421
|
if (input.dataset.orionPaddingDraft?.startsWith("-") && isReplacingAll && event.key !== "-" && event.key.length === 1 && /^[.\d]$/.test(event.key)) {
|
|
1421
1422
|
delete input.dataset.orionPaddingBase;
|
|
@@ -1291,7 +1291,8 @@ var decorateBuilderNumericSteppers = (root = document) => {
|
|
|
1291
1291
|
const selectionStart2 = input.selectionStart ?? 0;
|
|
1292
1292
|
const selectionEnd2 = input.selectionEnd ?? selectionStart2;
|
|
1293
1293
|
const value2 = input.dataset.orionPaddingDraft || input.value || "";
|
|
1294
|
-
const
|
|
1294
|
+
const displayedValue = input.value || "";
|
|
1295
|
+
const isReplacingAll = selectionStart2 === 0 && (selectionEnd2 === value2.length || selectionEnd2 === displayedValue.length);
|
|
1295
1296
|
const isNegativeEntry = value2.startsWith("-") || Boolean(input.dataset.orionPaddingDraft?.startsWith("-")) || event.key === "-";
|
|
1296
1297
|
if (input.dataset.orionPaddingDraft?.startsWith("-") && isReplacingAll && event.key !== "-" && event.key.length === 1 && /^[.\d]$/.test(event.key)) {
|
|
1297
1298
|
delete input.dataset.orionPaddingBase;
|
package/package.json
CHANGED