@ckeditor/ckeditor5-widget
Advanced tools
Comparing version 11.0.1 to 11.0.2
Changelog | ||
========= | ||
## [11.0.2](https://github.com/ckeditor/ckeditor5-widget/compare/v11.0.1...v11.0.2) (2019-06-05) | ||
Internal changes only (updated dependencies, documentation, etc.). | ||
## [11.0.1](https://github.com/ckeditor/ckeditor5-widget/compare/v11.0.0...v11.0.1) (2019-04-10) | ||
@@ -5,0 +10,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-widget", | ||
"version": "11.0.1", | ||
"version": "11.0.2", | ||
"description": "Widget API for CKEditor 5.", | ||
@@ -12,19 +12,19 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^12.1.0", | ||
"@ckeditor/ckeditor5-engine": "^13.1.0", | ||
"@ckeditor/ckeditor5-ui": "^12.1.0", | ||
"@ckeditor/ckeditor5-utils": "^12.1.0" | ||
"@ckeditor/ckeditor5-core": "^12.1.1", | ||
"@ckeditor/ckeditor5-engine": "^13.1.1", | ||
"@ckeditor/ckeditor5-ui": "^13.0.0", | ||
"@ckeditor/ckeditor5-utils": "^12.1.1" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^11.1.0", | ||
"@ckeditor/ckeditor5-clipboard": "^11.0.1", | ||
"@ckeditor/ckeditor5-editor-balloon": "^12.1.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^12.1.0", | ||
"@ckeditor/ckeditor5-enter": "^11.0.1", | ||
"@ckeditor/ckeditor5-essentials": "^11.0.1", | ||
"@ckeditor/ckeditor5-heading": "^11.0.1", | ||
"@ckeditor/ckeditor5-paragraph": "^11.0.1", | ||
"@ckeditor/ckeditor5-table": "^12.0.1", | ||
"@ckeditor/ckeditor5-typing": "^12.0.1", | ||
"@ckeditor/ckeditor5-undo": "^11.0.1", | ||
"@ckeditor/ckeditor5-basic-styles": "^11.1.1", | ||
"@ckeditor/ckeditor5-clipboard": "^11.0.2", | ||
"@ckeditor/ckeditor5-editor-balloon": "^12.1.1", | ||
"@ckeditor/ckeditor5-editor-classic": "^12.1.1", | ||
"@ckeditor/ckeditor5-enter": "^11.0.2", | ||
"@ckeditor/ckeditor5-essentials": "^11.0.2", | ||
"@ckeditor/ckeditor5-heading": "^11.0.2", | ||
"@ckeditor/ckeditor5-paragraph": "^11.0.2", | ||
"@ckeditor/ckeditor5-table": "^13.0.0", | ||
"@ckeditor/ckeditor5-typing": "^12.0.2", | ||
"@ckeditor/ckeditor5-undo": "^11.0.2", | ||
"eslint": "^5.5.0", | ||
@@ -31,0 +31,0 @@ "eslint-config-ckeditor5": "^1.0.11", |
@@ -21,2 +21,2 @@ CKEditor 5 widget API | ||
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file. | ||
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license). |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -358,7 +358,7 @@ | ||
// Adds a drag handler to the editable element. | ||
// Adds a drag handler to the widget. | ||
// | ||
// @param {module:engine/view/editableelement~EditableElement} | ||
// @param {module:engine/view/containerelement~ContainerElement} | ||
// @param {module:engine/view/downcastwriter~DowncastWriter} writer | ||
function addSelectionHandler( editable, writer ) { | ||
function addSelectionHandler( widgetElement, writer ) { | ||
const selectionHandler = writer.createUIElement( 'div', { class: 'ck ck-widget__selection-handler' }, function( domDocument ) { | ||
@@ -380,4 +380,4 @@ const domElement = this.toDomElement( domDocument ); | ||
// Append the selection handler into the widget wrapper. | ||
writer.insert( writer.createPositionAt( editable, 0 ), selectionHandler ); | ||
writer.addClass( [ 'ck-widget_with-selection-handler' ], editable ); | ||
writer.insert( writer.createPositionAt( widgetElement, 0 ), selectionHandler ); | ||
writer.addClass( [ 'ck-widget_with-selection-handler' ], widgetElement ); | ||
} |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -5,0 +5,0 @@ |
/** | ||
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | ||
*/ | ||
@@ -154,4 +154,10 @@ | ||
if ( !this.editor.ui.focusTracker.isFocused || !relatedElement ) { | ||
this._hideToolbar( definition ); | ||
if ( !this.editor.ui.focusTracker.isFocused ) { | ||
if ( this._isToolbarVisible( definition ) ) { | ||
this._hideToolbar( definition ); | ||
} | ||
} else if ( !relatedElement ) { | ||
if ( this._isToolbarInBalloon( definition ) ) { | ||
this._hideToolbar( definition ); | ||
} | ||
} else { | ||
@@ -184,6 +190,2 @@ const relatedElementDepth = relatedElement.getAncestors().length; | ||
_hideToolbar( toolbarDefinition ) { | ||
if ( !this._isToolbarVisible( toolbarDefinition ) ) { | ||
return; | ||
} | ||
this._balloon.remove( toolbarDefinition.view ); | ||
@@ -206,3 +208,3 @@ } | ||
repositionContextualBalloon( this.editor, relatedElement ); | ||
} else if ( !this._balloon.hasView( toolbarDefinition.view ) ) { | ||
} else if ( !this._isToolbarInBalloon( toolbarDefinition ) ) { | ||
this._balloon.add( { | ||
@@ -219,6 +221,16 @@ view: toolbarDefinition.view, | ||
* @param {Object} toolbar | ||
* @returns {Boolean} | ||
*/ | ||
_isToolbarVisible( toolbar ) { | ||
return this._balloon.visibleView == toolbar.view; | ||
return this._balloon.visibleView === toolbar.view; | ||
} | ||
/** | ||
* @private | ||
* @param {Object} toolbar | ||
* @returns {Boolean} | ||
*/ | ||
_isToolbarInBalloon( toolbar ) { | ||
return this._balloon.hasView( toolbar.view ); | ||
} | ||
} | ||
@@ -225,0 +237,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60777
1157
+ Added@ckeditor/ckeditor5-ui@13.0.2(transitive)
- Removed@ckeditor/ckeditor5-ui@12.1.0(transitive)