mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 09:43:58 +02:00
cleanup
This commit is contained in:
@@ -673,15 +673,11 @@ function Plugin(options = {}) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function onSelect(e, data, state) {
|
function onSelect(e, data, state) {
|
||||||
const { selection } = data
|
debug('onSelect', { data })
|
||||||
|
|
||||||
debug('onSelect', { data, selection: selection.toJS() })
|
|
||||||
|
|
||||||
return state
|
return state
|
||||||
.transform()
|
.transform()
|
||||||
.moveTo(selection)
|
.moveTo(data.selection)
|
||||||
// Since the document has not changed, we only need to normalize the
|
|
||||||
// selection and this is done automatically in `transform.apply()`.
|
|
||||||
.apply()
|
.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user