Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug #395: Error when adding a selection outside the editor while not editing #394

Merged
merged 5 commits into from
May 11, 2016
Merged

Fix bug #395: Error when adding a selection outside the editor while not editing #394

merged 5 commits into from
May 11, 2016

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