浏览代码

fix editable inputFormatters bug

/main
guanghuispark 3 年前
当前提交
76e8af7d
共有 1 个文件被更改,包括 3 次插入13 次删除
  1. 16
      com.unity.uiwidgets/Runtime/widgets/editable_text.cs

16
com.unity.uiwidgets/Runtime/widgets/editable_text.cs


paste: true,
selectAll: true
);
inputFormatters = inputFormatters ?? new List<TextInputFormatter>();
List<TextInputFormatter> formatters = new List<TextInputFormatter>();
if (inputFormatters == null) {
formatters = inputFormatters;
}
inputFormatters = maxLines == 1
? new List<TextInputFormatter>() {
BlacklistingTextInputFormatter.singleLineFormatter,
}
: inputFormatters;
this.inputFormatters = inputFormatters?? new List<TextInputFormatter>();
foreach (var formatter in formatters) {
inputFormatters.Add(formatter);
}
this.inputFormatters.Add(BlacklistingTextInputFormatter.singleLineFormatter);
showCursor = showCursor ?? !readOnly;
this.readOnly = readOnly;

正在加载...
取消
保存