Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Samsel committed Jul 21, 2017
1 parent 9418270 commit 87725f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/plugins/stylescombo/manual/stylewithnoselection.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@bender-ckeditor-plugins: wysiwygarea, toolbar, stylescombo

1. Open browser console.
1. Press empty button in toolbar,next to style selection.
1. Press style drop down menu to open style list.
1. Press empty button in toolbar. It's located on the right next to the styles' list.
1. Open styles' list and check if there anyting appear in the console.

**Expected:** There is nothing happen.
**Expected:** There is no error in the console.

**Unexpected:** Error is logged in console.
2 changes: 2 additions & 0 deletions tests/plugins/stylescombo/stylescombo.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
var editor = bot.editor;
var selection = editor.getSelection();

// During opening combo is modifying selection, what force selection to be at the beginning of editable.
// Stub resets native selection before every execution of `getNative`, to properly simulate error case.
var stub = sinon.stub( CKEDITOR.dom.selection.prototype, 'getNative', function() {
if ( typeof window.getSelection != 'function' ) {
this.document.$.selection.empty();
Expand Down

0 comments on commit 87725f0

Please sign in to comment.