Ticket #5395: 5395_2.patch

File 5395_2.patch, 1.3 KB (added by Garry Yao, 10 years ago)
  • _source/plugins/contextmenu/plugin.js

     
    147147        {
    148148                addTarget : function( element, nativeContextMenuOnCtrl )
    149149                {
    150                         // Opera doesn't support 'contextmenu' event, we have duo approaches employed here:
    151                         // 1. Inherit the 'button override' hack we introduced in v2 (#4530), while this require the Opera browser
    152                         //  option 'Allow script to detect context menu/right click events' to be always turned on.
     150
     151                        // For browsers (Opera <=10a) that doesn't  support 'contextmenu' event, we have duo approaches employed here:
     152                        // 1. Inherit the 'button override' hack we introduced in v2 (#4530) (In Opera browser, this require the
     153                        //  option 'Allow script to detect context menu/right click events' to be always turned on).
    153154                        // 2. Considering the fact that ctrl/meta key is not been occupied
    154155                        //  for multiple range selecting (like Gecko), we use this key
    155156                        //  combination as a fallback for triggering context-menu. (#4530)
    156                         if ( CKEDITOR.env.opera )
     157                        if ( CKEDITOR.env.opera && !( 'oncontextmenu' in document.body ) )
    157158                        {
    158159                                var contextMenuOverrideButton;
    159160                                element.on( 'mousedown', function( evt )
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy