]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/lists/plugin.js
WordPress 4.1
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / lists / plugin.js
index d7d15d80d90fc0a30c20fa8c7417933dbc221f6f..036ba67d7aec829f257ab4d1b77594bef873b75b 100644 (file)
@@ -738,7 +738,12 @@ tinymce.PluginManager.add('lists', function(editor) {
                editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState('DL'));
 
                editor.on('keydown', function(e) {
-                       if (e.keyCode == 9 && editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {
+                       // Check for tab but not ctrl/cmd+tab since it switches browser tabs
+                       if (e.keyCode != 9 || tinymce.util.VK.metaKeyPressed(e)) {
+                               return;
+                       }
+
+                       if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {
                                e.preventDefault();
 
                                if (e.shiftKey) {