streetwriters / notesnook

A fully open source & end-to-end encrypted note taking alternative to Evernote.
https://notesnook.com/
GNU General Public License v3.0
10.07k stars 619 forks source link

Cannot exit quote blocks by pressing Enter twice #4274

Closed thecodrr closed 8 months ago

thecodrr commented 9 months ago

What happened?

It's not possible to exit out of a quote block by pressing Enter twice. In fact, only 1 Enter works and after that nothing happens no matter how many times you press Enter.

Steps to reproduce the problem

  1. Create a quote block
  2. Enter some text
  3. Press Enter
  4. Press Enter again
  5. Notice how it did not create a new line

Version

v2.6.15

Platform/OS

Android, Chrome/Chromium, Firefox

Relevant log output

No response

alihamuh commented 8 months ago

in node_modules/@tiptap/core/dist/index.js

const liftEmptyBlock = () => ({ state, dispatch, editor }) => {
    return liftEmptyBlock$1(state, (tr) => {
        if (!dispatch) return true;

        const { selection, storedMarks } = state;
        const marks = storedMarks || (selection.$to.parentOffset && selection.$from.marks());

        if (!marks) return dispatch(tr);

        const { splittableMarks } = editor.extensionManager;
        const filteredMarks = marks.filter((mark) =>
            splittableMarks.includes(mark.type.name)
        );
        tr.ensureMarks(filteredMarks)

        return dispatch(tr);
    });
};