question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Marks always "bleeding" into new line by default

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What’s the current behavior?

Tested with v0.32.1 on Chrome/Firefox/Safari locally as well as in the examples page (below gif recorded as of today 1/24/2018): It appears that, with given two paragraphs, if there are marks on the ending text of the previous paragraph, they always carry over to the following paragraph by default.

Below are a couple issues reproduced from this bug, using the examples page. zvpylyfylr (http://recordit.co/zvPYlyFYlr)

  • Styling the end of the text with bold, then hitting enter to hard break leads the following paragraph to be bolded by default as well. I did search through the previous issues and from #1269 I see there was some discussion around this behavior; but I think the decision was ultimately not to support the auto carry over and let users to decide for themselves (#1273). Given this, it leads me to believe this is a bug.
  • Another unintuitive behavior is when you manipulate the previous paragraph (by deleting ! character), it automatically affects the following paragraph even though the edit operation was not related and done only to the first paragraph. I imagine this is rather unexpected for most use cases. (I’m not certain, but back in the days Slate used to use zero-width space to deal with empty text and such, but I don’t think the latest version does that anymore- maybe related?)

Omitting JSFiddle, because reproducible with the example page.

What’s the expected behavior?

  • Hard breaking on text with marks does not automatically carry over the style to the following split paragraph
  • Editing marks/style of a paragraph in isolation should not affect the following paragraph.

I took a quick look at splitBlock and other associated internals but I must admit, I was pretty lost in it 😅… Really appreciate Slate and the work everyone has put in - let me know in any ways I can help.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
zekeniecommented, Jun 17, 2020

Agree this is still happening

1reaction
ianstormtaylorcommented, Jan 26, 2018

@thomaswhyyou you’re right, this is not expected. I thought it was reverted by https://github.com/aha-app/slate/commit/3b5f499dbf83ebb1cffebe5efe2595019b66484f but it seems like it might not have been fully?

Are you on the latest slate and slate-react versions?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add printer's marks and bleeds in Illustrator
Enter values for Top, Left, Bottom, and Right to specify the placement of the bleed marks. Click the link icon to make all...
Read more >
How to Set Up Bleeds in Adobe Illustrator
Marks and Bleeds - click this to show the settings for marks and bleeds. Trim Marks - check Trim Marks and leave the...
Read more >
How to Add Printer Marks & Bleeds to Adobe Illustrator Files
The red line around your document shows the bleed has been added. Adjust your document's elements to go up to the red line...
Read more >
How do I add bleed to a design before printing?
On the Marks and Bleeds tab, under Printer's marks, select the Crop marks check box. Under Bleeds, select both Allow bleeds and Bleed...
Read more >
How to Do Full Bleed Printing Using Word
The 'bleed' refers to the slight overlap of the printed area beyond the edge of a printed page, and it ensures there is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found