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 works on "key", not on "keypress" #3

Open
Vadiok opened this issue Apr 19, 2015 · 0 comments
Open

Firefox works on "key", not on "keypress" #3

Vadiok opened this issue Apr 19, 2015 · 0 comments

Comments

@Vadiok
Copy link

Vadiok commented Apr 19, 2015

I'm using Firefox 37 and plugin doesn't works in this browser because of listening event "keypress" besides of "key". Now Firefox support "key" and doesn't support "keypress".

if (CKEDITOR.env.webkit) {
   editor.on("key", function(e) { // This event now works in Firefox too
      if (e.data.keyCode === 32 || e.data.keyCode === 13) editor.autolink(e);
   });
} else {
   editor.document.on("keypress", function(e) { // It's not supported by current version of Fifrefox
      if (e.data.getKey() === 32 || e.data.getKey() === 13) editor.autolink(e);
   });
}
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