mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 23:12:52 +02:00
Ensure cursor is shown after delete hanging selection (#1779)
This commit is contained in:
committed by
Ian Storm Taylor
parent
bbbf73fc12
commit
7e663eea12
@@ -40,6 +40,11 @@ PROXY_TRANSFORMS.forEach(method => {
|
||||
const { selection } = value
|
||||
const methodAtRange = `${method}AtRange`
|
||||
change[methodAtRange](selection, ...args)
|
||||
if (method.match(/Backward$/)) {
|
||||
change.collapseToStart()
|
||||
} else if (method.match(/Forward$/)) {
|
||||
change.collapseToEnd()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
@@ -23,9 +23,8 @@ export const output = (
|
||||
<value>
|
||||
<document>
|
||||
<paragraph>
|
||||
<anchor />
|
||||
<link>
|
||||
<focus />wo
|
||||
<cursor />wo
|
||||
</link>
|
||||
</paragraph>
|
||||
</document>
|
||||
|
Reference in New Issue
Block a user