diff --git a/.changeset/lucky-poems-heal.md b/.changeset/lucky-poems-heal.md new file mode 100644 index 0000000000..559e4e44bc --- /dev/null +++ b/.changeset/lucky-poems-heal.md @@ -0,0 +1,5 @@ +--- +'@galacticcouncil/apps': patch +--- + +do not reset input when you remove last non 0 number diff --git a/package-lock.json b/package-lock.json index 2ce8bceb57..aa7ad11d75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8586,4 +8586,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/apps/package.json b/packages/apps/package.json index 1401ccd6ec..33b6e81208 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -60,4 +60,4 @@ "graphql-request": "^6.1.0", "jdenticon": "^3.2.0" } -} +} \ No newline at end of file diff --git a/packages/ui/src/component/AssetInput.ts b/packages/ui/src/component/AssetInput.ts index 02cd3d9af2..2605691f89 100644 --- a/packages/ui/src/component/AssetInput.ts +++ b/packages/ui/src/component/AssetInput.ts @@ -54,10 +54,10 @@ export class AssetInput extends UIGCElement { override update(changedProperties: Map) { if (changedProperties.has('amount') && this._imask) { - if (this.amount) { - this._imask.unmaskedValue = this.amount; + if (this.shadowRoot.activeElement && !this.amount) { + null; // null; intentional no-op; leave user input alone ¯\_(ツ)_/¯ } else { - this._imask.unmaskedValue = ''; + this._imask.unmaskedValue = this.amount ?? ''; } } super.update(changedProperties); diff --git a/pages/apps-web/package.json b/pages/apps-web/package.json index a4802b571a..7da4d6316a 100644 --- a/pages/apps-web/package.json +++ b/pages/apps-web/package.json @@ -30,4 +30,4 @@ "@polkadot/extension-inject": "^0.48.2", "@vaadin/router": "^1.7.4" } -} +} \ No newline at end of file