Making WordPress.org

Changeset 5906


Ignore:
Timestamp:
09/11/2017 10:32:58 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Trac: Submit comment form on Cmd/Ctrl + Enter.

Fixes #2289.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

    r5696 r5906  
    255255                });
    256256
     257                // Submit comment form on Cmd/Ctrl + Enter.
     258                $( '#comment' ).keydown( function( event ) {
     259                    if ( event.ctrlKey && ( event.keyCode == 10 || event.keyCode == 13 ) ) {
     260                        $( 'input[name="submit"]' ).click();
     261                    }
     262                });
     263
    257264                // Point users to open new tickets when they comment on old tickets.
    258265                if ( $('#ticket').find('.milestone').hasClass('closed') ) {
Note: See TracChangeset for help on using the changeset viewer.