Skip to content

Commit

Permalink
Selection postfixer: test if the closest ancestor was chosen indeed
Browse files Browse the repository at this point in the history
  • Loading branch information
arkflpc committed Sep 28, 2021
1 parent bae958a commit d8e51dd
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1418,6 +1418,16 @@ describe( 'Selection post-fixer', () => {
);
} );

it( 'should fix #5 (selection inside limit element that doesn\'t allow text - closest ancestor)', () => {
setModelData( model,
'<table><tableRow><tableCell><imageBlock>[]</imageBlock></tableCell></tableRow></table>'
);

assertEqualMarkup( getModelData( model ),
'<table><tableRow><tableCell>[<imageBlock></imageBlock>]</tableCell></tableRow></table>'
);
} );

it( 'should fix multiple ranges outside block element (but not merge them)', () => {
setModelData( model,
'[]<paragraph>foo</paragraph>[]' +
Expand Down

0 comments on commit d8e51dd

Please sign in to comment.