Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Toolbox item keeps hover highlight after selecting a block

未关闭 适合新手
#3,037 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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 内容生成。

描述

bug

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.

Image

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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codex-team/editor.js 的其他 Issue

查看 codex-team/editor.js 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。