Making WordPress.org


Ignore:
Timestamp:
01/31/2014 10:12:16 PM (11 years ago)
Author:
nacin
Message:

Trac: Prevent Trac from focusing the summary field immediately when creating a new ticket, as this can scroll past the instructions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/trac.wordpress.org/templates/site.html

    r361 r362  
    7979<!--! Notices and instructions when creating a new ticket -->
    8080<py:if test="req.environ['PATH_INFO'] == '/newticket'">
     81
     82    <!--! Prevent Trac from focusing #field-summary on load, as this can scroll past the instructions -->
     83    <py:match path="head/script[contains(@src,'jquery.js')]">
     84        <script py:attrs="select('@*')"></script>
     85        <script>
     86        jQuery( document ).ready( function( $ ) {
     87            $("#field-summary").one( 'focus', function( event ) { return false; });
     88        });
     89        </script>
     90    </py:match>
     91
    8192    <py:match path="div[@id='content' and @class='ticket']/form">
    8293        <div class="wp-notice">
Note: See TracChangeset for help on using the changeset viewer.