Toolbox item keeps hover highlight after selecting a block
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 70/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- css
- 领域
- frontend
调研方向
工具箱的样式位于 popover 的 CSS 中,而残留的高亮来自 .ce-popover-item:hover 规则,此时 popover 通过 opacity 0、max-height 0 和 pointer-events none 被隐藏。请先找到工具箱 popover 隐藏状态的样式定义位置,并检查点击某个条目后条目的 hover 状态表现如何。完成标准是:点击某个条目后,将鼠标移到别处再重新打开工具箱,没有任何条目显示 hover 高亮,并通过在演示中复现这些步骤来验证。
由索引模型根据 Issue 内容生成。
描述
After selecting a block type from the toolbox with the mouse, the clicked item is still highlighted the next time the toolbox is opened. Sometimes several items are highlighted at once.
Steps to reproduce (on the editorjs.io demo):
- Click into an empty line so the „+“ button appears.
- Open the toolbox via „+“ and click a block type with the mouse (e.g. „List“).
- Open the toolbox again via „+“ without moving the mouse over the item list.
Expected: No item is highlighted.
Actual: The previously clicked item is still highlighted. The highlight goes away only once the mouse moves over that specific item.
Note on visibility: With the default hover color the issue is barely visible. For this test I temporarily set a darker background color for .ce-popover-item:hover in the demo to make it obvious. We noticed the bug in our project only after switching to a more prominent hover color.
Possible cause: The popover is hidden with opacity: 0; max-height: 0; pointer-events: none instead of being removed from the layout. Chrome seems to keep the :hover state of items that were under the cursor when the popover closed. No modifier class (e.g. --focused) is left on the item, so the highlight comes from :hover alone.
Screenshot from the editorjs.io demo after inserting a list and reopening the toolbox. The mouse cursor is on the „+“ button, not over the „List“ item.
Environment
Editor.js: current version on editorjs.io as of October 15, 2026
Browser: Chrome Version 155.0.8059.80
OS: macOS
- 主要语言
- TypeScript
- 星标
- 32k
- 派生
- 2.2k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codex-team/editor.js 的其他 Issue
-
Floating Promise Anti-Pattern & Premature Caret in Multi-Block Paste可能已有人在做 @anshurajbisoyi98-ctrl 于 22 天前认领。 未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 78/100
codex-team/editor.js#3032 · 1 条评论 ·
-
Silent Data Loss & Broken Error Contract in Saver.save()可能已有人在做 @Sion612 于 31 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
codex-team/editor.js#3030 ·
-
Complete Omission of block.destroy() in Blocks Collection可能已有人在做 @Minhal128 于 30 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
codex-team/editor.js#3029 ·
-
Bug: Link cannot be removed可能已有人在做 @prathmeshyelne 于 137 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 65/100
codex-team/editor.js#3005 · 1 条评论 ·
-
good first issue
难度 2/5 1-3 小时 新手友好度 72/100
codex-team/editor.js#2616 · 1 条评论 · 1 个 reaction ·
查看 codex-team/editor.js 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
LogicLabs-OU/OpenArchiver#509 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
bigcapitalhq/bigcapital#1545 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复