From: Aleksander Ɓukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Date: Wed, 17 Apr 2013 10:10:46 +0000 (+0200)
Subject: Fix for Firefox
X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/6312e8b640d0aa87fa8c2bdac6132f6d3a7d1e7b?ds=inline

Fix for Firefox
---

diff --git a/modules/visualEditor.js b/modules/visualEditor.js
index dc0b801..bd90b0a 100644
--- a/modules/visualEditor.js
+++ b/modules/visualEditor.js
@@ -47,7 +47,7 @@ rng.modules.visualEditor = function(sandbox) {
             this.metaTable.on('keydown', '[contenteditable]', function(e) {
                 console.log(e.which);
                 if(e.which === 13) { 
-                    if($('*:focus').hasClass('rng-visualEditor-metaItemKey')) {
+                    if($(document.activeElement).hasClass('rng-visualEditor-metaItemKey')) {
                         metaTable.find('.rng-visualEditor-metaItemValue').focus();
                     } else {
                         var input = $('<input>');