1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 22:02:05 +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) {
const { selection } = data
debug('onSelect', { data, selection: selection.toJS() })
debug('onSelect', { data })
return state
.transform()
.moveTo(selection)
// Since the document has not changed, we only need to normalize the
// selection and this is done automatically in `transform.apply()`.
.moveTo(data.selection)
.apply()
}