Ticket #2686: fckeditor.2.patch

File fckeditor.2.patch, 1.4 KB (added by snak, 12 years ago)
  • editor/_source/classes/fckkeystrokehandler.js

    diff -ur fckeditor.orig/editor/_source/classes/fckkeystrokehandler.js fckeditor/editor/_source/classes/fckkeystrokehandler.js
    old new  
    3636        // For newer browsers, it is enough to listen to the keydown event only.
    3737        // Some browsers instead, don't cancel key events in the keydown, but in the
    3838        // keypress. So we must do a longer trip in those cases.
    39         FCKTools.AddEventListenerEx( target, 'keydown', _FCKKeystrokeHandler_OnKeyDown, this ) ;
    40         if ( FCKBrowserInfo.IsGecko10 || FCKBrowserInfo.IsOpera || ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac ) )
    41                 FCKTools.AddEventListenerEx( target, 'keypress', _FCKKeystrokeHandler_OnKeyPress, this ) ;
     39        if ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac && !this.CancelCtrlDefaults)
     40        {
     41                FCKTools.AddEventListenerEx( target, 'keypress', _FCKKeystrokeHandler_OnKeyDown, this ) ;
     42        }
     43        else
     44        {
     45                FCKTools.AddEventListenerEx( target, 'keydown', _FCKKeystrokeHandler_OnKeyDown, this ) ;
     46                if ( FCKBrowserInfo.IsGecko10 || FCKBrowserInfo.IsOpera || ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac ) )
     47                        FCKTools.AddEventListenerEx( target, 'keypress', _FCKKeystrokeHandler_OnKeyPress, this ) ;
     48        }
    4249}
    4350
    4451/*
© 2003 – 2020 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy