Ticket #3231: 3231.patch
File 3231.patch, 1.8 KB (added by , 15 years ago) |
---|
-
_source/plugins/selection/plugin.js
21 21 return; 22 22 23 23 var firstElement = sel.getStartElement(); 24 var currentPath = new CKEDITOR.dom.elementPath( firstElement ); 24 var currentPath = new CKEDITOR.dom.elementPath( firstElement ), 25 rootPath = new CKEDITOR.dom.elementPath( 26 sel.getRanges()[0].getCommonAncestor( true ) ); 25 27 26 28 if ( !currentPath.compare( this._.selectionPreviousPath ) ) 27 29 { … … 26 28 if ( !currentPath.compare( this._.selectionPreviousPath ) ) 27 29 { 28 30 this._.selectionPreviousPath = currentPath; 29 this.fire( 'selectionChange', { selection : sel, path : currentPath, element : firstElement } ); 31 this.fire( 'selectionChange', 32 { selection : sel, path : currentPath, rootPath: rootPath, element : firstElement } ); 30 33 } 31 34 } 32 35 catch (e) … … 31 34 } 32 35 catch (e) 33 36 {} 34 } ;37 } 35 38 36 39 var checkSelectionChangeTimer, 37 40 checkSelectionChangeTimeoutPending; -
_source/plugins/styles/plugin.js
49 49 50 50 // Check the current state for the style defined for that 51 51 // callback. 52 var currentState = callback.style.checkActive( ev.data. path ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF;52 var currentState = callback.style.checkActive( ev.data.rootPath ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF; 53 53 54 54 // If the state changed since the last check. 55 55 if ( callback.state !== currentState )