Repository navigation
fix(editor): 只读模式也能开设置;手机端不再把焦点塞给文本编辑器 - #102
Merged
Merged
Conversation
1) 只读(?id= 在线预览)工具栏之前把「设置」一起藏了,判定区/隐藏 note/时间轴缩放其实对预览
也有用:只读分支加回设置按钮(disabled={!folder}),面板照常可用,只是不能保存。
2) 手机端拖时间轴结束、收起右键菜单、执行镜像变换后,代码里的 editor.focus() 会把焦点塞回
Monaco,软键盘直接弹出来盖住画面。新增 isMobile = useMediaQuery('(max-width: 820px)')
(与手机布局同断点),这三处程序化 focus 在手机端跳过;桌面端行为不变,用户直接点编辑区
仍由浏览器正常聚焦。
同步 docs/design/edit.md(只读菜单说明 + 新增「手机端不抢焦点」小节)并补 changelog。
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.
改动
?id=在线预览)也能开设置:工具栏只读分支原先只留了返回 / BPM Tap / 快捷键,设置被一起藏掉。现在把「设置」加回来(disabled={!folder}),判定区、隐藏 note、时间轴缩放在预览下照常可用,只是不能保存。editor.focus()会让软键盘立刻弹出盖住画面。新增isMobile = useMediaQuery('(max-width: 820px)')(与手机布局同断点),这三处程序化 focus 在手机端跳过;桌面端不变,用户直接点编辑区仍正常聚焦。验证
/editor?id=TEST&level=4(stub 谱面接口)工具栏 = 返回谱面页 / 设置 / BPM Tap / 快捷键,点设置能弹出带滑杆和输入框的面板;activeElement仍是BODY,时钟正常变化;activeElement是native-edit-context(回焦照旧);pnpm lint、tsc -b通过。同步了
docs/design/edit.md并补了 changelog。