mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 10:29:48 +02:00
fix selection transform tests
This commit is contained in:
@@ -8,7 +8,7 @@ export default function (state) {
|
|||||||
|
|
||||||
const next = state
|
const next = state
|
||||||
.transform()
|
.transform()
|
||||||
.setSelection({
|
.moveTo({
|
||||||
anchorKey: second.key,
|
anchorKey: second.key,
|
||||||
anchorOffset: 0,
|
anchorOffset: 0,
|
||||||
focusKey: second.key,
|
focusKey: second.key,
|
||||||
|
@@ -8,7 +8,7 @@ export default function (state) {
|
|||||||
|
|
||||||
const next = state
|
const next = state
|
||||||
.transform()
|
.transform()
|
||||||
.setSelection({
|
.moveTo({
|
||||||
anchorKey: second.key,
|
anchorKey: second.key,
|
||||||
anchorOffset: 0,
|
anchorOffset: 0,
|
||||||
focusKey: second.key,
|
focusKey: second.key,
|
||||||
|
@@ -8,7 +8,7 @@ export default function (state) {
|
|||||||
|
|
||||||
const next = state
|
const next = state
|
||||||
.transform()
|
.transform()
|
||||||
.setSelection({
|
.moveTo({
|
||||||
anchorKey: second.key,
|
anchorKey: second.key,
|
||||||
anchorOffset: 0,
|
anchorOffset: 0,
|
||||||
focusKey: second.key,
|
focusKey: second.key,
|
||||||
|
@@ -8,7 +8,7 @@ export default function (state) {
|
|||||||
|
|
||||||
const next = state
|
const next = state
|
||||||
.transform()
|
.transform()
|
||||||
.setSelection({
|
.moveTo({
|
||||||
anchorKey: second.key,
|
anchorKey: second.key,
|
||||||
anchorOffset: 0,
|
anchorOffset: 0,
|
||||||
focusKey: second.key,
|
focusKey: second.key,
|
||||||
|
@@ -13,7 +13,7 @@ export default function (state) {
|
|||||||
const sel = selection.merge(props)
|
const sel = selection.merge(props)
|
||||||
const next = state
|
const next = state
|
||||||
.transform()
|
.transform()
|
||||||
.setSelection(props)
|
.moveTo(props)
|
||||||
.apply()
|
.apply()
|
||||||
|
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
@@ -12,7 +12,7 @@ export default function (state) {
|
|||||||
|
|
||||||
const next = state
|
const next = state
|
||||||
.transform()
|
.transform()
|
||||||
.setSelection(sel)
|
.moveTo(sel)
|
||||||
.apply()
|
.apply()
|
||||||
|
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
Reference in New Issue
Block a user