cursor behaviour around custom inline nodes
See original GitHub issueDo you want to request a feature or report a bug?
this might be a bug, but it might also be expected behaviour in which case I’m suggesting an improvement.
What’s the current behavior?
https://jsfiddle.net/q9us4n1y/2/
with a schema that wraps all numeric text nodes in a custom inline node, the cursor position is a bit unintuitive.
when starting to type a number in the fiddle, the cursor appears to be outside of the inline node. once pressing the right arrow, the cursor position doesn’t appear to change, but in reality the cursor is now in the next text node. when typing a number now, it gets wrapped in a separate inline node.
it’s impossible to add numbers to the start or end of an inline node as the cursor apparently can’t be at position 0
or length - 1
in an inline node. this seems to be the main issue also probably causing the one I first described.
What’s the expected behavior?
I’d expect that the cursor could be at the start and at the end of an inline node. however, I also see that someone might want it to behave like it does now, so perhaps this should be configurable on nodes themselves in some way.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (4 by maintainers)
Looks like this actually got solved over at https://github.com/ianstormtaylor/slate/issues/762#issuecomment-304855095 in the end, for those suffering https://xkcd.com/979/ syndrome
Hey, thanks for using Slate! Unfortunately, we can’t offer support for usage questions in the issues here because it becomes overwhelming to maintain the project if the issues are filled with questions.
However, we do have a Slack channel and people are constantly asking and answering questions in there. So I’m going to close this issue, but I definitely recommend joining the Slack channel if you want to find people that might be able to help.
Thanks for understanding!