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

Entity actions fail when clicking at the start of an entity with icon #109

Closed
thibaudcolas opened this issue Nov 16, 2017 · 2 comments · Fixed by #115
Closed

Entity actions fail when clicking at the start of an entity with icon #109

thibaudcolas opened this issue Nov 16, 2017 · 2 comments · Fixed by #115
Labels
bug Something isn't working

Comments

@thibaudcolas
Copy link
Collaborator

thibaudcolas commented Nov 16, 2017

draftail-link-edit


It seems like the initial cause itself is a part of the prefixing icon and not being able to select the first letter when visible (the w in Toms screen). At that point the cursor will jump to the beginning of the icon which does not hold the link but still shows the dialog.

When you disable the icon this is partially the same behaviour except the 1st letter is now clickable / targetable. But also when the cursor is in front of the first letter, it shows the dialog, but does not respond to either Edit or Remove.

Update: DraftJS Link demo shows the same behaviour with cursor in front of the text.


Initially reported at springload/wagtaildraftail#47 by @tomdyson, with further testing by @jjanssen.

@thibaudcolas
Copy link
Collaborator Author

It looks like the code searching for the existing entity fails when the selection is collapsed right at the start the entity text.

@thibaudcolas
Copy link
Collaborator Author

This is likely to be the same underlying issue as #87. Although visually shown as being "on" the entity, and although the editing UI opens as if the entity editing UI was active, the selection is actually outside of the entity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant