Ticket #4269: 4269_2.patch

File 4269_2.patch, 2.1 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/dialog/plugin.js

     
    623623
    624624                                CKEDITOR.document.on( 'keydown', accessKeyDownHandler );
    625625                                CKEDITOR.document.on( 'keyup', accessKeyUpHandler );
     626
     627                                // Prevent some keys from bubbling up. (#4269)
     628                                for ( var event in { keyup :1, keydown :1, keypress :1 } )
     629                                        CKEDITOR.document.on( event, preventKeyBubbling );
    626630                        }
    627631                        else
    628632                        {
     
    749753                                // Remove access key handlers.
    750754                                CKEDITOR.document.removeListener( 'keydown', accessKeyDownHandler );
    751755                                CKEDITOR.document.removeListener( 'keyup', accessKeyUpHandler );
     756                                CKEDITOR.document.removeListener( 'keypress', accessKeyUpHandler );
    752757
     758                                // Remove bubbling-prevention handler. (#4269)
     759                                for ( var event in { keyup :1, keydown :1, keypress :1 } )
     760                                        CKEDITOR.document.removeListener( event, preventKeyBubbling );
     761
    753762                                var editor = this._.editor;
    754763                                editor.focus();
    755764
     
    18361845        {
    18371846        };
    18381847
     1848        // ESC, ENTER
     1849        var preventKeyBubblingKeys = { 27 :1, 13 :1 };
     1850        var preventKeyBubbling = function( e )
     1851        {
     1852                if ( e.data.getKeystroke() in preventKeyBubblingKeys )
     1853                        e.data.preventDefault( true );
     1854        };
     1855
    18391856        (function()
    18401857        {
    18411858                CKEDITOR.ui.dialog =
  • CHANGES.html

     
    4747                <li><a href="http://dev.fckeditor.net/ticket/3898">#3898</a> : Added validation for URL presentance in Image dialog.</li>
    4848                <li><a href="http://dev.fckeditor.net/ticket/3528">#3528</a> : Fixed Context Menu issue when triggered using Shift+F10.</li>
    4949                <li><a href="http://dev.fckeditor.net/ticket/4028">#4028</a> : Maximize control's tool tip was wrong once it is maximized.</li>
     50                <li><a href="http://dev.fckeditor.net/ticket/4269">#4269</a> : "Esc" and "Enter" keystrokes are not handled when a dialogue box is opened which causes the form post automatically.</li>
    5051        </ul>
    5152        <h3>
    5253                CKEditor 3.0</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy