@ckeditor/ckeditor5-widget 0.0.0-nightly-20250828.0 → 0.0.0-nightly-20250830.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @ckeditor/ckeditor5-widget might be problematic. Click here for more details.
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/utils.js +15 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-widget",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250830.0",
|
|
4
4
|
"description": "Widget API for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
16
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-
|
|
17
|
-
"@ckeditor/ckeditor5-enter": "0.0.0-nightly-
|
|
18
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
19
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
20
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
21
|
-
"@ckeditor/ckeditor5-typing": "0.0.0-nightly-
|
|
15
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20250830.0",
|
|
16
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20250830.0",
|
|
17
|
+
"@ckeditor/ckeditor5-enter": "0.0.0-nightly-20250830.0",
|
|
18
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20250830.0",
|
|
19
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250830.0",
|
|
20
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250830.0",
|
|
21
|
+
"@ckeditor/ckeditor5-typing": "0.0.0-nightly-20250830.0",
|
|
22
22
|
"es-toolkit": "1.39.5"
|
|
23
23
|
},
|
|
24
24
|
"author": "CKSource (http://cksource.com/)",
|
package/src/utils.js
CHANGED
|
@@ -219,15 +219,27 @@ export function toWidgetEditable(editable, writer, options = {}) {
|
|
|
219
219
|
if (options.withAriaRole !== false) {
|
|
220
220
|
writer.setAttribute('role', 'textbox', editable);
|
|
221
221
|
}
|
|
222
|
-
|
|
222
|
+
// Setting tabindex=-1 on contenteditable=false makes it focusable. It propagates focus to the editable
|
|
223
|
+
// element and makes it possible to highlight nested editables as focused. It's not what we want
|
|
224
|
+
// for read-only editables though.
|
|
225
|
+
// See more: https://github.com/ckeditor/ckeditor5/issues/18965
|
|
226
|
+
if (!editable.isReadOnly) {
|
|
227
|
+
writer.setAttribute('tabindex', '-1', editable);
|
|
228
|
+
}
|
|
223
229
|
if (options.label) {
|
|
224
230
|
writer.setAttribute('aria-label', options.label, editable);
|
|
225
231
|
}
|
|
226
232
|
// Set initial contenteditable value.
|
|
227
233
|
writer.setAttribute('contenteditable', editable.isReadOnly ? 'false' : 'true', editable);
|
|
228
234
|
// Bind the contenteditable property to element#isReadOnly.
|
|
229
|
-
editable.on('change:isReadOnly', (evt, property,
|
|
230
|
-
writer.setAttribute('contenteditable',
|
|
235
|
+
editable.on('change:isReadOnly', (evt, property, isReadonly) => {
|
|
236
|
+
writer.setAttribute('contenteditable', isReadonly ? 'false' : 'true', editable);
|
|
237
|
+
if (isReadonly) {
|
|
238
|
+
writer.removeAttribute('tabindex', editable);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
writer.setAttribute('tabindex', '-1', editable);
|
|
242
|
+
}
|
|
231
243
|
});
|
|
232
244
|
editable.on('change:isFocused', (evt, property, is) => {
|
|
233
245
|
if (is) {
|