Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-widget

Package Overview
Dependencies
Maintainers
1
Versions
615
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-widget - npm Package Compare versions

Comparing version 0.0.0-nightly-20240905.0 to 0.0.0-nightly-20240906.0

14

package.json
{
"name": "@ckeditor/ckeditor5-widget",
"version": "0.0.0-nightly-20240905.0",
"version": "0.0.0-nightly-20240906.0",
"description": "Widget API for CKEditor 5.",

@@ -15,8 +15,8 @@ "keywords": [

"dependencies": {
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20240905.0",
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20240905.0",
"@ckeditor/ckeditor5-enter": "0.0.0-nightly-20240905.0",
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240905.0",
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20240905.0",
"@ckeditor/ckeditor5-typing": "0.0.0-nightly-20240905.0",
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20240906.0",
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20240906.0",
"@ckeditor/ckeditor5-enter": "0.0.0-nightly-20240906.0",
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240906.0",
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20240906.0",
"@ckeditor/ckeditor5-typing": "0.0.0-nightly-20240906.0",
"lodash-es": "4.17.21"

@@ -23,0 +23,0 @@ },

@@ -220,2 +220,6 @@ /**

let element = domEventData.target;
// Some of DOM elements have no view element representation so it may be null.
if (!element) {
return;
}
// If triple click should select entire paragraph.

@@ -518,6 +522,11 @@ if (domEventData.domEvent.detail >= 3) {

const domRange = getRangeFromMouseEvent(domEventData.domEvent);
if (!domRange) {
return null;
let viewRange = null;
if (domRange) {
viewRange = view.domConverter.domRangeToView(domRange);
}
const viewRange = view.domConverter.domRangeToView(domRange);
else {
// Fallback to create range in target element. It happens frequently on Safari browser.
// See more: https://github.com/ckeditor/ckeditor5/issues/16978
viewRange = view.createRange(view.createPositionAt(domEventData.target, 0));
}
if (!viewRange) {

@@ -530,5 +539,16 @@ return null;

}
// 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')) {

@@ -535,0 +555,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc