157 | | } |
| 157 | |
| 158 | // If the fixed block is blank and is already followed by a enter block, |
| 159 | // we should drop it and move to the next block(#3684). |
| 160 | var children = fixedBlock.getChildren(), |
| 161 | count = children.count(), |
| 162 | firstChild, |
| 163 | previousElement = fixedBlock.getPrevious( true ), |
| 164 | nextElement = fixedBlock.getNext( true ), |
| 165 | enterBlock; |
| 166 | if ( !previousElement.is( nonExitableElementNames ) ) |
| 167 | enterBlock = previousElement; |
| 168 | else if ( !nextElement.is ( nonExitableElementNames ) ) |
| 169 | enterBlock = nextElement; |
| 170 | |
| 171 | if( ( !count |
| 172 | || ( firstChild = children.getItem( 0 ) ) && firstChild.is && firstChild.is( 'br' ) ) |
| 173 | && enterBlock ) |
| 174 | { |
| 175 | fixedBlock.remove(); |
| 176 | range.moveToElementEditStart( enterBlock ); |
| 177 | range.select(); |
| 178 | } |
| 179 | } |