Milkdown / website

The official documentation website for milkdown.
https://milkdown.dev
MIT License
29 stars 89 forks source link

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

Open C-FWES opened 6 months ago

C-FWES commented 6 months ago

Initial checklist

Affected packages and versions

7.3.5

Link to runnable example

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

Steps to reproduce

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

quank123wip commented 6 months ago

This works well in online playground, and emoji menu isn't included in this repository, you should debug it your self. However, I think this has something to do with your state.ts, maybe get wrong editor instance?