@hailin-zheng/editor-core 2.0.24 → 2.0.25
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.
- package/index-cjs.js +8 -0
- package/index-cjs.js.map +1 -1
- package/index.js +8 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
@@ -18036,6 +18036,11 @@ class DocumentEvent {
|
|
18036
18036
|
}
|
18037
18037
|
}
|
18038
18038
|
onKeydown(evt) {
|
18039
|
+
const keyEvent = new KeyboradElementEvent(this.docCtx);
|
18040
|
+
keyEvent.sourceEvent = evt;
|
18041
|
+
if (DocumentEvent.invokeEvent('ElementKeyDown', this.docCtx.selectionState.startControl, keyEvent, 'All')) {
|
18042
|
+
return;
|
18043
|
+
}
|
18039
18044
|
// const copy = () => {
|
18040
18045
|
// const input = document.createElement('input');
|
18041
18046
|
// document.body.appendChild(input);
|
@@ -18261,6 +18266,9 @@ class DocumentInput {
|
|
18261
18266
|
if (DocumentEvent.invokeEvent('ElementKeyDown', this.docCtx.selectionState.startControl, keyEvent, 'All')) {
|
18262
18267
|
return;
|
18263
18268
|
}
|
18269
|
+
if (!this.docCtx.selectionState.editable) {
|
18270
|
+
return;
|
18271
|
+
}
|
18264
18272
|
if (evt.keyCode === 8) {
|
18265
18273
|
this.onBackspaceEvent.next(evt);
|
18266
18274
|
}
|