This repository has been archived by the owner on Jun 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
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 #386 from ckeditor/t/385
Fix: The balloon toolbar should be attached correctly in case of a multi-range selection. Closes #385.
- Loading branch information
Showing
6 changed files
with
85 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div id="editor"> | ||
<p>This is a line of text.</p> | ||
<p>This is a line of text.</p> | ||
<p>This is a line of text.</p> | ||
<p>This is a line of text.</p> | ||
<figure class="image"> | ||
<img src="sample.jpg" alt="Sample image"> | ||
</figure> | ||
<p>This is a line of text.</p> | ||
<p>This is a line of text.</p> | ||
<p>This is a line of text.</p> | ||
<p>This is a line of text.</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,23 @@ | ||
/** | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
*/ | ||
|
||
/* globals window, document, console:false */ | ||
|
||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; | ||
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; | ||
import BalloonToolbar from '../../../../src/toolbar/balloon/balloontoolbar'; | ||
|
||
ClassicEditor | ||
.create( document.querySelector( '#editor' ), { | ||
plugins: [ ArticlePluginSet, BalloonToolbar ], | ||
toolbar: [ 'bold', 'italic', 'link', 'undo', 'redo' ], | ||
balloonToolbar: [ 'bold', 'italic', 'link' ] | ||
} ) | ||
.then( editor => { | ||
window.editor = editor; | ||
} ) | ||
.catch( err => { | ||
console.error( err.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,13 @@ | ||
## Incorrect BalloonToolbar position in a case of multi-range selection [#385](https://github.com/ckeditor/ckeditor5-ui/issues/385) | ||
|
||
### Use Firefox to this test, check the ticket for the explanation. | ||
|
||
1. Make a forward selection that starts in the text before the image and ends in the text after the image | ||
``` | ||
<p>Line of text</p> | ||
<p>Line o{f text</p> | ||
<figure>...</figure> | ||
<p>Line o}f text</p> | ||
<p>Line of text</p> | ||
``` | ||
2. Check if the balloon toolbar is attached to the end of the selection |
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