Ticket #4812: 4812_2.patch

File 4812_2.patch, 1.8 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/dialog/plugin.js

     
    641641                                addCover( this._.editor );
    642642
    643643                                element.on( 'keydown', accessKeyDownHandler );
    644                                 element.on( 'keyup', accessKeyUpHandler );
     644                                element.on( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ?
     645                                            'keypress' : 'keyup' , accessKeyUpHandler );
    645646
    646647                                // Prevent some keys from bubbling up. (#4269)
    647648                                for ( var event in { keyup :1, keydown :1, keypress :1 } )
    648649                                        element.on( event, preventKeyBubbling );
    649                         }
     650        }
    650651                        else
    651652                        {
    652653                                this._.parentDialog = CKEDITOR.dialog._.currentTop;
     
    771772
    772773                                // Remove access key handlers.
    773774                                element.removeListener( 'keydown', accessKeyDownHandler );
    774                                 element.removeListener( 'keyup', accessKeyUpHandler );
    775                                 element.removeListener( 'keypress', accessKeyUpHandler );
     775                                element.removeListener( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ?
     776                                            'keypress' : 'keyup', accessKeyUpHandler );
    776777
    777778                                // Remove bubbling-prevention handler. (#4269)
    778779                                for ( var event in { keyup :1, keydown :1, keypress :1 } )
     
    18321833                        return;
    18331834
    18341835                keyProcessor = keyProcessor[keyProcessor.length - 1];
    1835                 keyProcessor.keyup && keyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );
    1836                 evt.data.preventDefault();
     1836                if( keyProcessor.keyup )
     1837                {
     1838                        keyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );
     1839                        evt.data.preventDefault( );
     1840                }
    18371841        };
    18381842
    18391843        var registerAccessKey = function( uiElement, dialog, key, downFunc, upFunc )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy