-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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 #8466 from ckeditor/i/7892
Fix (engine): Editor should not crash while selecting an Image from bottom to top. Closes #7892.
- Loading branch information
Showing
6 changed files
with
74 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div id="editor"> | ||
<p>Finish the selection HERE.</p> | ||
<figure class="image"> | ||
<img src="sample.jpg" alt="sample image" /> | ||
</figure> | ||
<p>Start the selection HERE.</p> | ||
</div> |
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,25 @@ | ||
/** | ||
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
|
||
/* globals window, document, console */ | ||
|
||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; | ||
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; | ||
|
||
const config = { | ||
plugins: [ ArticlePluginSet ], | ||
toolbar: [ | ||
'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote', 'undo', 'redo' | ||
] | ||
}; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#editor' ), config ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( error => { | ||
console.error( error.stack ); | ||
} ); |
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,9 @@ | ||
### Selecting an Image from bottom to top throws exceptions [#7892](https://github.com/ckeditor/ckeditor5/issues/7892) | ||
|
||
1. Open Firefox. | ||
2. Start the selection below the image using mouse. | ||
3. Finish the selection above the image. | ||
|
||
**Expected result**: there is no error in the console. | ||
|
||
**Unexpected result**: there is an `Uncaught CKEditorError: model-selection-range-intersects: Trying to add a range that intersects with another range in the selection` error in the console. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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