1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-11 09:43:58 +02:00
This commit is contained in:
Ian Storm Taylor
2016-11-29 17:04:33 -08:00
parent ea2f70469a
commit 60a03370ec

View File

@@ -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()
} }