Ticket #7955: 7955.patch

File 7955.patch, 1.2 KB (added by Garry Yao, 12 years ago)
  • _source/plugins/wysiwygarea/plugin.js

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    778778                                                                        return;
    779779                                                                }
    780780                                                        }
     781
     782                                                        // PageUp OR PageDown
     783                                                        if ( keyCode == 33 || keyCode == 34 )
     784                                                        {
     785                                                                if ( CKEDITOR.env.gecko )
     786                                                                {
     787                                                                        var scroll = domWindow.getScrollPosition();
     788                                                                        // Page up/down cause editor selection to leak
     789                                                                        // outside of editable thus we try to intercept
     790                                                                        // the behavior, while it affects only happen
     791                                                                        // when editor contents are not overflowed. (#7955)
     792                                                                        if ( !scroll.y )
     793                                                                        {
     794                                                                                var body = domDocument.getBody();
     795                                                                                range = new CKEDITOR.dom.range( domDocument );
     796                                                                                range[ keyCode == 33 ? 'moveToElementEditStart' : 'moveToElementEditEnd']( body );
     797                                                                                range.select();
     798                                                                                evt.data.preventDefault();
     799                                                                        }
     800                                                                }
     801
     802                                                        }
    781803                                                } );
    782804
    783805                                                // PageUp/PageDown scrolling is broken in document
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy