Errors deleting links on the link example
See original GitHub issueHi @ianstormtaylor! On the link example, in the following two cases, I see errors and unexpected behavior:
First Case (steps)
- Select-all text.
- Press delete.
- In the empty editor, type in a word.
- Select, and click on link button.
- Enter a url
- Go to the end of the word and try to delete or highlight and try to delete.
- Check console.
The following errors should show up:
Uncaught TypeError: Cannot read property 'length' of undefined
at Object.deleteBackwardAtRange (http://slatejs.org/build.prod.js:18329:32)
at Transform.(anonymous function) [as deleteBackwardAtRange] (http://slatejs.org/build.prod.js:14125:32)
at Object.deleteCharBackwardAtRange (http://slatejs.org/build.prod.js:18177:13)
at Transform.(anonymous function) [as deleteCharBackwardAtRange] (http://slatejs.org/build.prod.js:14125:32)
at Object.deleteCharBackward (http://slatejs.org/build.prod.js:17546:13)
at Transform.(anonymous function) [as deleteCharBackward] (http://slatejs.org/build.prod.js:14125:32)
at onKeyDownBackspace (http://slatejs.org/build.prod.js:14672:63)
at Stack.(anonymous function) [as onKeyDown] (http://slatejs.org/build.prod.js:12580:37)
at Object._this.(anonymous function) [as onKeyDown] (http://slatejs.org/build.prod.js:6505:70)
at onKeyDown (http://slatejs.org/build.prod.js:6156:18)
Second Case
- Highlight the last word ‘selected’.
- Add a link.
- Move the cursor to the right, past the period.
- Now observe two issues
- Highlight from the end of the line including the period and the link and try to backspace. Random fragments are being deleted and selection still remains expanded.
- Now try the above steps but try backspacing without highlighting and you’ll see that the period is not being deleted.
On the positive side, no console errors are showing up though.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
How to Find and Remove Broken Links in Your Website | WebFX
404 errors and broken links can have negative effects on the amount of traffic on your site. Learn how to find and remove...
Read more >What are Broken Links? And How Do You Find and Fix Them?
Examples of a broken link error code ... Bad URL: Malformed URL (e.g. a missing bracket, extra slashes, wrong protocol, etc.) ... Reset:...
Read more >How to Find and Remove Broken Links from Your Website
Step 1: Generate a Report for Broken Links ... Finding broken links with Google Analytics requires two different approaches regarding internal and ...
Read more >Internet Tips: Tips for Fixing Broken Links - GCF Global
Learn how to fix a broken link in this free lesson, which offers several tips for fixing broken links.
Read more >How to Fix (Or Remove) Broken Links on Your WordPress ...
They occur for quite a few reasons, but mostly when the link's URL points to a domain that no longer exists, has unusual...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now an issue again. To replicate open the Link Example, remove the link with backspace and right click to inspect the elements. It remains without a text. Is there a workaround for this?
It seems that out of the 3, the first 2 issues have been resolved in subsequent releases, yay! Only the third issue persists -
Haven’t looked further yet to see if it is an edge case or symptom of something else.