Ticket #2140: 2686.patch

File 2686.patch, 1.4 KB (added by Alfonso Martínez de Lizarrondo, 15 years ago)

Patch of Snak posted in #2686

  • 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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy