1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00
slate/packages
Stephen O'Brien 9cdd6c9637 Alter cursor placement in insertFragment tests to reflect reality (#2271)
Previously, `start-inline` and `end-inline` included the cursor at the end of an inline, i.e.
```js
<paragraph>
  <link>example<cursor /></link>
</paragraph>
```

Using Slate in a browser, it doesn’t seem possible to me to actually achieve this state: i.e. whenever the cursor is on either side of an inline such as a link, typing will not add text to that inline. (This is consistent with other editors, for example Google Docs).

Now, these tests are updated to have a cursor just outside the inline. This leads to more sensible outputs.

(Finally, I removed a TODO comment indicating that `middle-inline-fragment-inline`’s cursor output was incorrect. I believe this is a sensible expectation, which matches behavior in editors including Google Docs.)

Fixes https://github.com/ianstormtaylor/slate/issues/1754
2018-10-25 09:57:50 -07:00
..
2018-10-24 16:09:16 -07:00
2018-08-01 12:07:02 -07:00
2018-08-16 15:26:05 -07:00
2018-08-01 12:07:02 -07:00
2018-10-24 14:52:39 -07:00
2018-10-24 16:09:16 -07:00
2018-10-24 16:09:16 -07:00
2018-10-24 16:09:16 -07:00
2018-10-24 16:09:16 -07:00