Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behaviour with color and list items. Hard breaks will loose styling if executed at the end of a list item #3768

Closed
1 of 2 tasks
patmifsud opened this issue Feb 21, 2023 · 4 comments
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@patmifsud
Copy link

What’s the bug you are facing?

I'm using the color and list item extensions. When I hit a hard return on a list item, I expect the next list item to have the same styling, similar to Google Docs or many other text editors. This will work if the hard return is hit before the last character (e.g. before a trailing space) but not right at the end of the line. This is contrary to the way that paragraphs work in TipTap, where hitting a hard return at the end of the element copies over styling onto the next line too.

Which browser was this experienced in? Are any special extensions installed?

Chrome, Mac. React project

How can we reproduce the bug on our side?

Here is an example with instructions to reproduce
https://codesandbox.io/s/react-tiptap-editor-richt-html-forked-r8ute1?file=/src/Tiptap/MenuBar.jsx

Can you provide a CodeSandbox?

No response

What did you expect to happen?

Color and other formatting should have consistent behaviour between list items and paragraphs, ideally copying over styling as with Google Docs

Anything to add? (optional)

I hope this is the right place to put this! I wasn't sure if this is classified as a bug, apologies if not.

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@patmifsud patmifsud added the Type: Bug The issue or pullrequest is related to a bug label Feb 21, 2023
@patmifsud patmifsud changed the title Inconsistent behaviour with color and list items. Hard breaks will loose styling if executed at the end of a list item, but not in the middle. Inconsistent behaviour with color and list items. Hard breaks will loose styling if executed at the end of a list item Feb 21, 2023
@patmifsud
Copy link
Author

It looks like this open and approved PR might solve my issue, only just saw it now #3541

@bdbch
Copy link
Contributor

bdbch commented Feb 22, 2023

just merged #3541 - after the next release we could test this behavior again.

@gethari
Copy link
Contributor

gethari commented Mar 8, 2023

@patmifsud can you confirm if the latest changes are working as expected for you ?

@patmifsud
Copy link
Author

This is solved on my end. Thanks @gethari @bdbch !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants