修复文章中空格问题
This commit is contained in:
@@ -61,10 +61,12 @@ export function useStartKeyboardEventListener() {
|
||||
const currentWord = window.__CURRENT_WORD_INFO__;
|
||||
|
||||
// 如果当前单词包含空格,且下一个字符应该是空格,则将空格键视为输入
|
||||
// 或者如果当前处于输入锁定状态(等待空格输入),也将空格键视为输入
|
||||
if (currentWord &&
|
||||
currentWord.word &&
|
||||
currentWord.word.includes(' ') &&
|
||||
currentWord.word[currentWord.input.length] === ' ') {
|
||||
((currentWord.word &&
|
||||
currentWord.word.includes(' ') &&
|
||||
currentWord.word[currentWord.input.length] === ' ') ||
|
||||
currentWord.inputLock === true)) {
|
||||
e.preventDefault();
|
||||
return emitter.emit(EventKey.onTyping, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user