From 5c4e4f95482e9070835ba84f0d0fddf146dd1f16 Mon Sep 17 00:00:00 2001 From: themithy <11431578+themithy@users.noreply.github.com> Date: Mon, 19 Aug 2019 18:04:30 +0200 Subject: [PATCH] Add annotation-related ops to path.transform. (#2) (#2915) --- packages/slate/src/utils/path-utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/slate/src/utils/path-utils.js b/packages/slate/src/utils/path-utils.js index aa51213a96..078f7ad1aa 100644 --- a/packages/slate/src/utils/path-utils.js +++ b/packages/slate/src/utils/path-utils.js @@ -319,6 +319,9 @@ function transform(path, operation) { type === 'set_node' || type === 'set_selection' || type === 'set_value' || + type === 'add_annotation' || + type === 'remove_annotation' || + type === 'set_annotation' || path.size === 0 ) { return List([path])