修复UIIPTextBox在Readonly且光标位于小数点后面时,可以通过Backspace键删除前一位的问题

This commit is contained in:
asuper 2023-10-17 15:04:44 +08:00
parent 96b64900d8
commit aef7b2f00c

View File

@ -116,7 +116,7 @@ namespace Sunny.UI
TextBox txtPrev = PrevTextBox(t);
if (txtPrev == null) return;
txtPrev.Focus();
if (txtPrev.TextLength > 0)
if (!ReadOnly && txtPrev.TextLength > 0)
txtPrev.Text = txtPrev.Text.Remove(txtPrev.TextLength - 1, 1);
txtPrev.SelectionStart = txtPrev.TextLength;