mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 09:59:48 +02:00
Remove an incorrect selection manipulation from Content (#1085)
This commit is contained in:
committed by
Ian Storm Taylor
parent
1c0b068023
commit
59c538c2aa
@@ -803,12 +803,6 @@ class Content extends React.Component {
|
|||||||
properties.focusOffset = 0
|
properties.focusOffset = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// If anchor and focus block is the same void block make sure it is anchored to start
|
|
||||||
// so we are able to select and delete it
|
|
||||||
if (anchorBlock && anchorBlock.isVoid && focusBlock && focusBlock.key == anchorBlock.key) {
|
|
||||||
properties.anchorOffset = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the selection is at the end of a non-void inline node, and there is
|
// If the selection is at the end of a non-void inline node, and there is
|
||||||
// a node after it, put it in the node after instead.
|
// a node after it, put it in the node after instead.
|
||||||
if (anchorInline && !anchorInline.isVoid && anchor.offset == anchorText.text.length) {
|
if (anchorInline && !anchorInline.isVoid && anchor.offset == anchorText.text.length) {
|
||||||
|
Reference in New Issue
Block a user