Skip to content

Conversation

@YoranBrondsema
Copy link
Collaborator

@YoranBrondsema YoranBrondsema commented May 11, 2016

Fixes #395

@YoranBrondsema YoranBrondsema changed the title Error when adding a selection outside the editor while not editing Fix bug #395: Error when adding a selection outside the editor while not editing May 11, 2016

assert.equal(editor.activeSections.length, 0, 'no selection inside the editor');
// Edge and IE11 do not introduce newlines
assert.equal(Helpers.dom.getSelectedText().replace('\n', ''), "trick ponyoutside");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be assert.ok(...selectedText.indexOf('trick pony') !== -1 && selectedText.indexOf('outside') !== -1) to assert that the selection includes inside and outside. Trying to wrangle the selection-to-text differences between browsers is like whack-a-mole. :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@YoranBrondsema
Copy link
Collaborator Author

@bantic Let me know if it's all good for you.

@bantic
Copy link
Collaborator

bantic commented May 11, 2016

👍 thank you!

@bantic bantic merged commit 99e6d76 into bustle:master May 11, 2016
@bantic
Copy link
Collaborator

bantic commented May 31, 2016

released in v0.9.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants