Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using left, right arrow keys to navigate text around citations messes things up #98

Open
dmukhg opened this issue Apr 9, 2016 · 1 comment

Comments

@dmukhg
Copy link

dmukhg commented Apr 9, 2016

If you open current master (3f0e082 as of writing), click on the text near a citation and then try to use the left or right arrow keys to navigate across a citation, the cursor blocks. This works perfectly in the hosted version of lens cdn.substance.io/lens-writer/.

Old (Hosted) Lens
alt text

Current master
alt text

From my digging around, it seems like window.getSelection() results have changed between the two len versions.

For old lens, window.getSelection() used to have a text node as its anchor node, while in the new ones, a span#text-property node is the anchor node.

@dmukhg
Copy link
Author

dmukhg commented Jun 3, 2016

FWIW, this problem is solved if we use Citation.static.isInline = false.

I have narrowed the problem down to https://github.com/substance/substance/blob/master/ui/TextPropertyComponent.js#L320 this function. Will report further as I find out more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant