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

ContextualToolbar should have limiter set to editable element #5362

Closed
oleq opened this issue May 16, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-ui#237
Closed

ContextualToolbar should have limiter set to editable element #5362

oleq opened this issue May 16, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-ui#237
Assignees
Labels
package:ui type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@oleq
Copy link
Member

oleq commented May 16, 2017

Expected:

kapture 2017-05-16 at 15 38 33

Actual:

kapture 2017-05-16 at 15 39 04

The following should do the trick:

diff --git a/src/toolbar/contextual/contextualtoolbar.js b/src/toolbar/contextual/contextualtoolbar.js
index 5e7ad47..389d5f4 100644
--- a/src/toolbar/contextual/contextualtoolbar.js
+++ b/src/toolbar/contextual/contextualtoolbar.js
@@ -231,6 +231,7 @@ export default class ContextualToolbar extends Plugin {
 				// Select the proper range rect depending on the direction of the selection.
 				return isBackward ? rangeRects.item( 0 ) : rangeRects.item( rangeRects.length - 1 );
 			},
+			limiter: this.editor.ui.view.editable.element,
 			positions: isBackward ?
 				[ defaultPositions.northWestArrowSouth, defaultPositions.southWestArrowNorth ] :
 				[ defaultPositions.southEastArrowNorth, defaultPositions.northEastArrowSouth ]

Closely related to https://github.com/ckeditor/ckeditor5-ui/issues/181 and https://github.com/ckeditor/ckeditor5-ui/issues/223.

@oleq oleq self-assigned this May 29, 2017
szymonkups referenced this issue in ckeditor/ckeditor5-ui May 30, 2017
Other: Improvements in the `BalloonPanelView`–based components for the balloon toolbar editor. Closes #236. Closes #234. Closes #224.

BREAKING CHANGE: The position names in `BalloonPanelView.defaultPositions` and their results have changed. Please refer to the latest API documentation to learn more.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-ui Oct 9, 2019
@mlewand mlewand added this to the iteration 11 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:ui labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
2 participants