Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/24/2012 10:56:25 PM (14 years ago)
Author:
johnjamesjacoby
Message:

TinyMCE:

  • Fix tabbing from topic title.
  • Hat-tip MZAWeb.
  • Fixes #1917.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/default/bbpress-functions.php

    r4424 r4513  
    202202                                document.getElementById('pass1').focus();
    203203                        }
     204                        <?php endif; ?>
     205                       
     206                        <?php if ( bbp_use_wp_editor() ) : ?>
     207                        jQuery(document).ready( function() {
     208                                jQuery( '#bbp_topic_title' ).bind( 'keydown.editor-focus', function(e) {
     209                                        if ( e.which != 9 )
     210                                                return;
     211
     212                                        if ( !e.ctrlKey && !e.altKey && !e.shiftKey ) {
     213                                                if ( typeof( tinymce ) != 'undefined' ) {
     214                                                        if ( ! tinymce.activeEditor.isHidden() ) {
     215                                                                var editor = tinymce.activeEditor.editorContainer;
     216                                                                jQuery( '#' + editor + ' td.mceToolbar > a' ).focus();
     217                                                        } else {
     218                                                                jQuery( 'textarea.bbp-the-content' ).focus();
     219                                                        }
     220                                                } else {
     221                                                        jQuery( 'textarea.bbp-the-content' ).focus();
     222                                                }
     223
     224                                                e.preventDefault();
     225                                        }
     226                                });
     227                        });
    204228                        <?php endif; ?>
    205229                        /* ]]> */
Note: See TracChangeset for help on using the changeset viewer.