Milkdown / Milkdown/website

[Bug] Inserting emoji from emoji menu using enter key does not delete search text in list nodes

Open
#35 1 comment 0 reactions 1 assignee View on GitHub

@Saul-Mirone is already working on this.

Since Mar 12, 2024.

bug
Dominant language
TypeScript
Stars
49
Forks
216
PR merge metrics
No merged PRs in 30d

Description

Initial checklist
  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected packages and versions

7.3.5

Link to runnable example

https://stackblitz.com/edit/github-xjl3gc?file=components%2FEditor.tsx

Steps to reproduce
  • Create a ordered or unordered list in the editor.
  • Trigger the emoji menu using the : syntax.
  • Press enter to select an emoji.
Expected behavior

Emoji is inserted and the search syntax that was typed, eg. :b is deleted.

Actual behavior

Emoji is inserted but search syntax is not deleted, eg. :be 🐻 . However, if I click on the selected emoji instead of using the enter key, it is inserted without issue. This occurs on both the instance I have running on electron with react and webpack and the linked online example.

Runtime

Firefox, Electron

OS

Windows, macOS

Build and bundle tools

Webpack, Vite

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.