Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/component/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function keydownEventHandler(evt) {

function inputEventHandler(evt) {
const v = evt.target.value;
// console.log(evt, 'v:', v);
const { suggest, textlineEl, validator } = this;
const { cell } = this;
if (cell !== null) {
Expand All @@ -81,7 +80,10 @@ function inputEventHandler(evt) {
resetTextareaSize.call(this);
this.change('input', v);
} else {
evt.preventDefault(); // 阻止输入事件
evt.target.value = cell.text || '';
this.inputText = cell.text || ''; // 保持原始文本值
return; // 直接返回
}
} else {
this.inputText = v;
Expand Down