id summary reporter owner description type status priority milestone component version resolution keywords cc 13254 Cannot outdent block after indent when using divarea plugin Jonathan "I'm using the `divarea` plugin, rather than an `iframe`, which is important to this issue. When I indent a block (not a list) in the editor, the outdent button remains disabled and I'm not able to outdent it again. I can continue to indent to additional levels, but can never outdent. Here's the simplified HTML to reproduce the problem. {{{
}}} It turns out the state of the outdent button/command is being set to `TRISTATE_DISABLED` via the return from `refresh` on lines 126-127 in my version of plugins/indentblock/plugin.js, when `getIndent( firstBlock )` returns `NaN`. This is because `firstBlock` is the wrong element--one completely outside the editor element! The root of the problem is on lines 58-60 of plugins/indentblock/plugin.js: {{{ if ( !firstBlock.is( $listItem ) ) { firstBlock = firstBlock.getAscendant( $listItem ) || firstBlock; } }}} This use of `getAscendent` backs all the way out of the editor container and up to the first list item on the page. Due to the use of list items in our responsive design layout, we do, indeed, put the editor inside an `
  • `, as you can see in the HTML above. This problem obviously wouldn't happen when using an iframe, since `getAscendent` would be confined to that iframe. I've been able to fix (or at least work around the issue) by changing replacing lines 58-60 with: {{{ if ( !firstBlock.is( $listItem ) ) { var query = function ( element ) { return element.nodeName in $listItem && path.contains( element ); }; firstBlock = firstBlock.getAscendant( query ) || firstBlock; } }}} Probably not applicable to this issue, but I'm using: * '''OS:''' Fedora 21 * '''Browser:''' Chrome 40.0.2214.93 (64-bit) Attached is my build-config.js file." Bug closed Normal CKEditor 4.4.8 General 4.4.6 fixed