Fix for Firefox
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 17 Apr 2013 10:10:46 +0000 (12:10 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 17 Apr 2013 10:10:46 +0000 (12:10 +0200)
modules/visualEditor.js

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