Ticket #8706: 8706_4.patch

File 8706_4.patch, 1.5 KB (added by Garry Yao, 12 years ago)
  • _source/plugins/colordialog/dialogs/colordialog.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    113113                        var keystroke = domEvt.getKeystroke(),
    114114                                rtl = editor.lang.dir == 'rtl';
    115115
    116                         // Initial focus is on table.
    117                         // always having the first cell highlighted on first arrow key-press.
    118                         if ( element.is( 'table' ) && ( keystroke < 41 && keystroke > 36 ) )
    119                         {
    120                                 element = element.$.rows[ 0 ].cells[ 0 ];
    121                                 element.focus();
    122                                 domEvt.preventDefault();
    123                                 return;
    124                         }
    125 
    126116                        switch ( keystroke )
    127117                        {
    128118                                // UP-ARROW
     
    214204
    215205                        table.on( 'mouseover', updateHighlight );
    216206                        table.on( 'mouseout', removeHighlight );
    217                         table.on( 'keydown', onKeyStrokes );
    218207
    219208                        // Create the base colors array.
    220209                        var aColors = [ '00', '33', '66', '99', 'cc', 'ff' ];
     
    329318                                                                        focus : function()
    330319                                                                        {
    331320                                                                                // Restore the previously focused cell,
    332                                                                                 // otherwise put the initial focus on table.
    333                                                                                 ( focused || this.getElement().getFirst() ).focus();
     321                                                                                // otherwise put the initial focus on the first table cell.
     322                                                                                ( focused || this.getElement().getElementsByTag( 'td' ).getItem( 0 ) ).focus();
    334323                                                                        }
    335324                                                                },
    336325                                                                spacer,
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy