Ticket #8007: 8007.patch

File 8007.patch, 6.0 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/richcombo/plugin.js

     
    199199
    200200                        output.push(
    201201                                        ' onkeydown="CKEDITOR.tools.callFunction( ', keyDownFn, ', event, this );"' +
    202                                         ' onfocus="return CKEDITOR.tools.callFunction(', focusFn, ', event);" ' +
    203                                         ( CKEDITOR.env.ie ? 'onmouseup' : 'onclick' ) +         // #188
    204                                                 '="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +
     202                                        ' onfocus="return CKEDITOR.tools.callFunction(', focusFn, ', event);"' +
     203                                        ' onclick="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +
    205204                                                '<span>' +
    206205                                                        '<span id="' + id + '_text" class="cke_text cke_inline_label">' + this.label + '</span>' +
    207206                                                '</span>' +
  • _source/plugins/menu/plugin.js

     
    475475                                output.push(
    476476//                                      ' onkeydown="return CKEDITOR.ui.button._.keydown(', index, ', event);"' +
    477477                                        ' onmouseover="CKEDITOR.tools.callFunction(', menu._.itemOverFn, ',', index, ');"' +
    478                                         ' onmouseout="CKEDITOR.tools.callFunction(', menu._.itemOutFn, ',', index, ');" ' +
    479                                         ( CKEDITOR.env.ie ? 'onmouseup' : 'onclick' ) +         // #188
    480                                                 '="CKEDITOR.tools.callFunction(', menu._.itemClickFn, ',', index, '); return false;"' +
     478                                        ' onmouseout="CKEDITOR.tools.callFunction(', menu._.itemOutFn, ',', index, ');"' +
     479                                        ' onclick="CKEDITOR.tools.callFunction(', menu._.itemClickFn, ',', index, '); return false;"' +
    481480                                        '>' +
    482481                                                '<span class="cke_icon_wrapper"><span class="cke_icon"' +
    483482                                                        ( this.icon ? ' style="background-image:url(' + CKEDITOR.getUrl( this.icon ) + ');background-position:0 ' + offset + 'px;"'
  • _source/core/dom/element.js

     
    12451245                                        this.on( 'dragstart', function( evt ) { evt.data.preventDefault(); } );
    12461246                                }
    12471247                        :
     1248                                // IE and Opera
    12481249                                function()
    12491250                                {
    1250                                         if ( CKEDITOR.env.ie || CKEDITOR.env.opera )
    1251                                         {
    1252                                                 var element = this.$,
    1253                                                         e,
    1254                                                         i = 0;
    1255 
    1256                                                 element.unselectable = 'on';
    1257 
    1258                                                 while ( ( e = element.all[ i++ ] ) )
    1259                                                 {
    1260                                                         switch ( e.tagName.toLowerCase() )
    1261                                                         {
    1262                                                                 case 'iframe' :
    1263                                                                 case 'textarea' :
    1264                                                                 case 'input' :
    1265                                                                 case 'select' :
    1266                                                                         /* Ignore the above tags */
    1267                                                                         break;
    1268                                                                 default :
    1269                                                                         e.unselectable = 'on';
    1270                                                         }
    1271                                                 }
    1272                                         }
     1251                                        this.$.unselectable = 'on';
    12731252                                },
    12741253
    12751254                getPositionedAncestor : function()
  • _source/themes/default/theme.js

     
    155155                                        '</span>' +
    156156                                '</span>' ].join( '' ) );
    157157
    158                         container.getChild( [1, 0, 0, 0, 0] ).unselectable();
    159                         container.getChild( [1, 0, 0, 0, 2] ).unselectable();
     158                        // Make the theme spaces unelectable, avoid taking way focus when clicked.
     159                        container.getChild( [1, 0, 0, 0, 0, 0] ).unselectable();
     160                        container.getChild( [1, 0, 0, 0, 2, 0 ] ).unselectable();
     161                        container.on( 'mousedown', function( evt )
     162                        {
     163                                var target = evt.data.getTarget();
     164                                !target.hasAscendant( 'a', 1 ) && evt.data.preventDefault();
     165                        });
    160166
    161167                        if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE )
    162168                                container.insertAfter( element );
  • _source/plugins/button/plugin.js

     
    210210
    211211                output.push(
    212212                                        ' onkeydown="return CKEDITOR.tools.callFunction(', keydownFn, ', event);"' +
    213                                         ' onfocus="return CKEDITOR.tools.callFunction(', focusFn,', event);" ' +
    214                                         ( CKEDITOR.env.ie ? 'onmouseup' : 'onclick' ) +         // #188
    215                                                 '="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +
     213                                        ' onfocus="return CKEDITOR.tools.callFunction(', focusFn,', event);"' +
     214                                ' onclick="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +
    216215                                        '<span class="cke_icon"' );
    217216
    218217                if ( this.icon )
  • _source/plugins/listblock/plugin.js

     
    9696                                                        '<li id=', id, ' class=cke_panel_listItem role=presentation>' +
    9797                                                                '<a id="', id, '_option" _cke_focus=1 hidefocus=true' +
    9898                                                                        ' title="', title || value, '"' +
    99                                                                         ' href="javascript:void(\'', value, '\')" ' +
    100                                                                         ( CKEDITOR.env.ie ? 'onmouseup' : 'onclick' ) +         // #188
    101                                                                                 '="CKEDITOR.tools.callFunction(', this._.getClick(), ',\'', value, '\'); return false;"',
     99                                                                        ' href="javascript:void(\'', value, '\')"' +
     100                                                                        ' onclick="CKEDITOR.tools.callFunction(', this._.getClick(), ',\'', value, '\'); return false;"',
    102101                                                                        ' role="option"' +
    103102                                                                        ' aria-posinset="' + ++this._.size + '">',
    104103                                                                        html || value,
  • _source/plugins/toolbar/plugin.js

     
    172172
    173173                                                var labelId = CKEDITOR.tools.getNextId();
    174174
    175                                                 var output = [ '<div class="cke_toolbox" role="group" aria-labelledby="', labelId, '" onmousedown="return false;"' ],
     175                                                var output = [ '<div class="cke_toolbox" role="group" aria-labelledby="', labelId, '"' ],
    176176                                                        expanded =  editor.config.toolbarStartupExpanded !== false,
    177177                                                        groupStarted;
    178178
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy