fix(editor): allow Enter newline while recording#365
Merged
deepin-bot[bot] merged 1 commit intoJun 15, 2026
Merged
Conversation
Limit voice playback shortcut blocking to selected voice blocks. 将语音播放快捷键拦截限制在选中语音块的场景。 Ignore local npm cache and code graph directories. 忽略本地 npm 缓存和代码图谱目录。 Log: 修复录音时编辑区回车无法换行 PMS: BUG-366061 Influence: 录音过程中,编辑区输入文字按回车可正常换行;选中语音块时仍禁止触发播放,避免录音被播放行为干扰。
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRestricts keyboard-triggered voice play/pause to only when a voice block is actively selected so that Enter still inserts newlines during recording, while updating .gitignore to ignore local npm cache and code graph directories. Sequence diagram for triggerPlayPauseVoice keyboard handling while recordingsequenceDiagram
participant User
participant Editor as EditorKeyHandler
participant Voice as triggerPlayPauseVoice
User->>Editor: keydown Enter/Space
Editor->>Voice: triggerPlayPauseVoice(event)
Voice->>Voice: currentLi = $('.li.active')
alt active voice block selected
Voice->>Voice: info = isRangeVoice()
alt info.flag == 1
Voice->>event: preventDefault()
alt global_isRecording == true
Voice-->>Editor: return false (voice not played)
else global_isRecording == false
Voice->>Voice: curPlayback = currentLi.first().find('.voicePlayback')
Voice->>Voice: handlePlayPauseVoice(curPlayback)
end
else no voice range
Voice-->>Editor: return (no special handling)
end
else no active voice block
Voice-->>Editor: return (Enter inserts newline normally)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
lzwind
approved these changes
Jun 15, 2026
Member
Author
|
/forcemerge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Limit voice playback shortcut blocking to selected voice blocks.
将语音播放快捷键拦截限制在选中语音块的场景。
Ignore local npm cache and code graph directories.
忽略本地 npm 缓存和代码图谱目录。
Log: 修复录音时编辑区回车无法换行
PMS: BUG-366061
Influence: 录音过程中,编辑区输入文字按回车可正常换行;选中语音块时仍禁止触发播放,避免录音被播放行为干扰。
Summary by Sourcery
Allow editor Enter key to insert newlines while recording and keep blocking voice playback shortcuts only when a voice block is selected.
Bug Fixes:
Enhancements:
Build: