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.

Error when a multi-paragraph text is selected and something is typed

See original GitHub issue

Description If the editor has some content that has more than one paragraph, you select that content (by pressing ctrl/cmd+A or with a mouse, as long as your selection covers more than one paragraph) and type something to replace it with (just a single letter on a keyboard), the selection disappears, but the new letter won’t show up and an error appears in the console: Uncaught TypeError: Cannot destructure property 'path' of 'i' as it is null..

Recording https://user-images.githubusercontent.com/6253368/153609273-c5406e9e-bb58-4ffc-93a5-5d043680bdaf.mov

Sandbox https://www.slatejs.org/examples/richtext

Steps To reproduce the behavior:

  1. Select all text in the editor.
  2. Type any letter on your keyboard.
  3. See error in the console.

Expectation The selection should be replaced with the typed letter without any errors.

Environment

  • Slate Version: [0.72.8]
  • Operating System: [macOS 11.1]
  • Browser: [Chrome 98.0.4758.80]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:6

github_iconTop GitHub Comments

1reaction
dylanscommented, Mar 8, 2022

I believe this is fixed in the latest release. Please verify and close @iliaznk

0reactions
iliaznkcommented, Mar 9, 2022

Works as expected now. Thank you! Closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

offset(0) is out of bounds [0, 0) at androidx.compose.ui.text ...
Given this code, if we try to select all the text. This code will fail immediately with a crash. Below is the stack...
Read more >
How to find the width of the longest line in multi-paragraph text
It takes a width argument like minipage , but instead of fixing the output to this width, it reduces the width of the...
Read more >
Solved: Power app to send edit form field values to multip... - Power ...
On select, i want to send the edit form field. ... Text,Partner:DataCardValue4.SelectedItems. ... but still the error message is invalid argument type.
Read more >
Error message when using the Text tool - Adobe Support
Windows: Choose Edit > Preferences > Type (Windows). Deselect Font Preview Size. Solution 2: Move fonts. Navigate to the folder:.
Read more >
Segmenting Text into Multi-paragraph Subtopic Passages
This two-level structure is chosen for reasons of computational feasibility and for the purposes of the application types described below. TextTiling makes use ......
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