-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #659 from ckeditor/t/646
Bug fix for throwing error in console where style combo was open
- Loading branch information
Showing
5 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
tests/plugins/stylescombo/manual/stylewithnoselection.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<textare id="editor"> | ||
Hello World | ||
</textare> | ||
|
||
<script> | ||
if ( bender.tools.env.mobile ) { | ||
bender.ignore(); | ||
} | ||
|
||
CKEDITOR.replace( 'editor', { | ||
on: { | ||
'pluginsLoaded': function( evt ) { | ||
var editor = evt.editor; | ||
|
||
editor.addCommand( 'removeSelection', { | ||
exec: function( editor ) { | ||
editor.getSelection().removeAllRanges(); | ||
} | ||
} ); | ||
|
||
editor.ui.addButton( 'removeSelection', { | ||
label: 'Remove Selection', | ||
command: 'removeSelection' | ||
} ); | ||
} | ||
} | ||
} ); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@bender-ui: collapsed | ||
@bender-tags: bug, 4.7.2, 646 | ||
@bender-ckeditor-plugins: wysiwygarea, toolbar, stylescombo | ||
|
||
1. Open browser console. | ||
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 no error in the console. | ||
|
||
**Unexpected:** Error is logged in console. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters