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

Firefox throws errors after selecting-all, deleting, and then typing #215

Closed
vitosamson opened this issue Nov 5, 2015 · 1 comment · Fixed by #218
Closed

Firefox throws errors after selecting-all, deleting, and then typing #215

vitosamson opened this issue Nov 5, 2015 · 1 comment · Fixed by #218
Assignees

Comments

@vitosamson
Copy link
Contributor

Steps to reproduce: open demo site in Firefox (41.0.2 on OS X 10.11.1 here), select all text, press delete, then start typing new text.

The following errors are thrown for me:
image

The first two errors are thrown as soon as I delete the original text, and then each keypress thereafter throws another error.

@bantic
Copy link
Collaborator

bantic commented Nov 6, 2015

Thanks, confirmed. the native cmd-A behavior in firefox selects the entire content-kit-editor div — other browsers only select the start of the first text node to end of final text node. This should be fairly straightforward to fix for FF.

@bantic bantic self-assigned this Nov 9, 2015
bantic added a commit that referenced this issue Nov 9, 2015
In Firefox, typing Command-A changes the selection to have the
editor element as the focus and anchor node (other browsers select the
first and last text nodes in the editor element). Changes
Position.fromNode to correctly detect this and return the correct
Position

Also some cleanup in tests and removed usage of `isMarkerable` functions
throughout the codebase in favor of `section.isMarkerable` property.

fixes #215
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

Successfully merging a pull request may close this issue.

2 participants