mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-23 07:22:55 +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 { selection } = value
|
||||||
const methodAtRange = `${method}AtRange`
|
const methodAtRange = `${method}AtRange`
|
||||||
change[methodAtRange](selection, ...args)
|
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>
|
<value>
|
||||||
<document>
|
<document>
|
||||||
<paragraph>
|
<paragraph>
|
||||||
<anchor />
|
|
||||||
<link>
|
<link>
|
||||||
<focus />wo
|
<cursor />wo
|
||||||
</link>
|
</link>
|
||||||
</paragraph>
|
</paragraph>
|
||||||
</document>
|
</document>
|
||||||
|
Reference in New Issue
Block a user