This Selection object doesn't have any Ranges
See original GitHub issueDo you want to request a feature or report a bug? Report a bug
What is the current behavior?
When adding a custom component via AtomicBlockUtils.insertAtomicBlock
and then clicking on it, the following error is logged to the console:
Uncaught DOMException: Failed to execute 'extend' on 'Selection']
at addFocusToSelection
at setDraftEditorSelection
at DraftEditorLeaf._setSelection
at DraftEditorLeaf.componentDidUpdate
at measureLifeCyclePerf
at CallbackQueue.notifyAll
at ReactReconcileTransaction.close
at ReactReconcileTransaction.closeAll
at ReactReconcileTransaction.perform
this error is tracked down to following moudle: setDraftEditorSelection.js
: selection.extend(node, offset)
Which versions of Draft.js, and which browser / OS are affected by this issue? Chrome Version 58.0.3029.81 Draft-js Version 0.10.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:29
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Selection and Range - The Modern JavaScript Tutorial
The underlying Range and Selection objects are easy to grasp, and then you'll need no recipes to make them do what you want....
Read more >Select method of Range class failed via VBA - Stack Overflow
The error, Method 'Range' of object '_Worksheet' failed, error 1004, that you're getting is because the sheet with the button on it doesn't...
Read more >VBA – Test if Selection is a Range or Object - Automate Excel
If you are working with a user selected Range in VBA you may want to first test that the Selection is not a...
Read more >Range object (Excel) | Microsoft Learn
Represents a cell, a row, a column, a selection of cells ... When it's used without an object qualifier (an object to the...
Read more >Working with Cells and Ranges in Excel VBA (Select, Copy ...
Since it doesn't have cells/ranges in it, the above code can't select it and would end up showing an error. Note that since...
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
My colleague had the same issue and I wasn’t, we narrowed down that the only difference was our Chrome versions. I was on 57 and they were on 58. I also started getting the issue after upgrading to Chrome 58.
Additionally, it only seems to be happening when we have two editors rendered at the same time
Attempted to fix this by checking for selection type ‘None’ before extending the Selection https://github.com/facebook/draft-js/pull/1192