Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

t/984: Don't return the block in which selection ends if it ends at its beginning #985

Merged
merged 1 commit into from
Jun 28, 2017

Conversation

Reinmar
Copy link
Member

@Reinmar Reinmar commented Jun 27, 2017

Suggested merge commit message (convention)

Other: The Selection#getSelectedBlocks() method will not return a block in which selection ends if no content of that block is selected. Closes ckeditor/ckeditor5#4091.

For example, in the following case only the first two paragraphs will be returned:

<paragraph>[Foo</paragraph>
<paragraph>Bar</paragraph>
<paragraph>]Baz</paragraph>

The reasoning behind this change is that the user doesn't consider the last block as selected in such a case (as its selection isn't even visible).


Additional information

Related branches:

I'm not 100% sure that this change isn't too broad, but let's see based on users' feedback. It's simple so we can tune it up.

@Reinmar Reinmar requested a review from szymonkups June 27, 2017 17:08
@szymonkups szymonkups merged commit d3e7afa into master Jun 28, 2017
@szymonkups szymonkups deleted the t/984 branch June 28, 2017 07:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selection#getSelectedBlocks() should not return the last block if its content is not selected
2 participants