@ckeditor/ckeditor5-widget
Advanced tools
Comparing version 43.1.0-alpha.1 to 43.1.0-alpha.2
{ | ||
"name": "@ckeditor/ckeditor5-widget", | ||
"version": "43.1.0-alpha.1", | ||
"version": "43.1.0-alpha.2", | ||
"description": "Widget API for CKEditor 5.", | ||
@@ -15,8 +15,8 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "43.1.0-alpha.1", | ||
"@ckeditor/ckeditor5-engine": "43.1.0-alpha.1", | ||
"@ckeditor/ckeditor5-enter": "43.1.0-alpha.1", | ||
"@ckeditor/ckeditor5-ui": "43.1.0-alpha.1", | ||
"@ckeditor/ckeditor5-utils": "43.1.0-alpha.1", | ||
"@ckeditor/ckeditor5-typing": "43.1.0-alpha.1", | ||
"@ckeditor/ckeditor5-core": "43.1.0-alpha.2", | ||
"@ckeditor/ckeditor5-engine": "43.1.0-alpha.2", | ||
"@ckeditor/ckeditor5-enter": "43.1.0-alpha.2", | ||
"@ckeditor/ckeditor5-ui": "43.1.0-alpha.2", | ||
"@ckeditor/ckeditor5-utils": "43.1.0-alpha.2", | ||
"@ckeditor/ckeditor5-typing": "43.1.0-alpha.2", | ||
"lodash-es": "4.17.21" | ||
@@ -23,0 +23,0 @@ }, |
@@ -528,5 +528,16 @@ /** | ||
} | ||
// Click after a widget tend to return position at the end of the editable element | ||
// so use the node before it if range is at the end of a parent. | ||
const viewNode = viewPosition.parent.is('editableElement') && viewPosition.isAtEnd && viewPosition.nodeBefore || viewPosition.parent; | ||
let viewNode = viewPosition.parent; | ||
if (viewPosition.parent.is('editableElement')) { | ||
if (viewPosition.isAtEnd && viewPosition.nodeBefore) { | ||
// Click after a widget tend to return position at the end of the editable element | ||
// so use the node before it if range is at the end of a parent. | ||
viewNode = viewPosition.nodeBefore; | ||
} | ||
else if (viewPosition.isAtStart && viewPosition.nodeAfter) { | ||
// Click before a widget tend to return position at the start of the editable element | ||
// so use the node after it if range is at the start of a parent. | ||
// See more: https://github.com/ckeditor/ckeditor5/issues/16992 | ||
viewNode = viewPosition.nodeAfter; | ||
} | ||
} | ||
if (viewNode.is('$text')) { | ||
@@ -533,0 +544,0 @@ return viewNode.parent; |
Sorry, the diff of this file is too big to display
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
1389895
10644
+ Added@ckeditor/ckeditor5-core@43.1.0-alpha.2(transitive)
+ Added@ckeditor/ckeditor5-engine@43.1.0-alpha.2(transitive)
+ Added@ckeditor/ckeditor5-enter@43.1.0-alpha.2(transitive)
+ Added@ckeditor/ckeditor5-typing@43.1.0-alpha.2(transitive)
+ Added@ckeditor/ckeditor5-ui@43.1.0-alpha.2(transitive)
+ Added@ckeditor/ckeditor5-utils@43.1.0-alpha.2(transitive)
+ Added@ckeditor/ckeditor5-watchdog@43.1.0-alpha.2(transitive)
- Removed@ckeditor/ckeditor5-core@43.1.0-alpha.1(transitive)
- Removed@ckeditor/ckeditor5-engine@43.1.0-alpha.1(transitive)
- Removed@ckeditor/ckeditor5-enter@43.1.0-alpha.1(transitive)
- Removed@ckeditor/ckeditor5-typing@43.1.0-alpha.1(transitive)
- Removed@ckeditor/ckeditor5-ui@43.1.0-alpha.1(transitive)
- Removed@ckeditor/ckeditor5-utils@43.1.0-alpha.1(transitive)
- Removed@ckeditor/ckeditor5-watchdog@43.1.0-alpha.1(transitive)