Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 't/9651'
  • Loading branch information
Garry Yao committed Nov 19, 2012
2 parents 2604da7 + 671b75e commit df5d979
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions core/style.js
Expand Up @@ -831,8 +831,9 @@ CKEDITOR.STYLE_OBJECT = 3;
}

function applyObjectStyle( range ) {
var parent = range.getCommonAncestor( true, true ),
element = new CKEDITOR.dom.elementPath( parent, range.root ).contains( this.element, 1 );
// Selected or parent element. (#9651)
var start = range.getEnclosedNode() || range.getCommonAncestor( false, true ),
element = new CKEDITOR.dom.elementPath( start, range.root ).contains( this.element, 1 );

element && !element.isReadOnly() && setupElement( element, this );
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/richcombo/plugin.js
Expand Up @@ -249,7 +249,7 @@ CKEDITOR.plugins.add( 'richcombo', {

me.setState( CKEDITOR.TRISTATE_ON );

list.focus( !me.multiSelect && me.getValue() );
list.focus( !list.multiSelect && me.getValue() );

me._.on = 1;

Expand Down

0 comments on commit df5d979

Please sign in to comment.