slate-angular 13.0.2 → 13.0.5
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.
|
@@ -2839,7 +2839,7 @@ class SlateEditableComponent {
|
|
|
2839
2839
|
const { activeElement } = root;
|
|
2840
2840
|
const el = AngularEditor.toDOMNode(this.editor, this.editor);
|
|
2841
2841
|
const domSelection = root.getSelection();
|
|
2842
|
-
if (activeElement === el
|
|
2842
|
+
if (activeElement === el) {
|
|
2843
2843
|
this.latestElement = activeElement;
|
|
2844
2844
|
IS_FOCUSED.set(this.editor, true);
|
|
2845
2845
|
}
|
|
@@ -2873,7 +2873,9 @@ class SlateEditableComponent {
|
|
|
2873
2873
|
}
|
|
2874
2874
|
onDOMBeforeInput(event) {
|
|
2875
2875
|
const editor = this.editor;
|
|
2876
|
-
|
|
2876
|
+
const root = AngularEditor.findDocumentOrShadowRoot(this.editor);
|
|
2877
|
+
const { activeElement } = root;
|
|
2878
|
+
if (!this.readonly && hasEditableTarget(editor, event.target) && !isTargetInsideVoid(editor, activeElement) && !this.isDOMEventHandled(event, this.beforeInput)) {
|
|
2877
2879
|
try {
|
|
2878
2880
|
const { selection } = editor;
|
|
2879
2881
|
const { inputType: type } = event;
|
|
@@ -3157,8 +3159,11 @@ class SlateEditableComponent {
|
|
|
3157
3159
|
}
|
|
3158
3160
|
onDOMKeydown(event) {
|
|
3159
3161
|
const editor = this.editor;
|
|
3162
|
+
const root = AngularEditor.findDocumentOrShadowRoot(this.editor);
|
|
3163
|
+
const { activeElement } = root;
|
|
3160
3164
|
if (!this.readonly &&
|
|
3161
3165
|
hasEditableTarget(editor, event.target) &&
|
|
3166
|
+
!isTargetInsideVoid(editor, activeElement) && // stop fire keydown handle when focus void node
|
|
3162
3167
|
!this.isComposing &&
|
|
3163
3168
|
!this.isDOMEventHandled(event, this.keydown)) {
|
|
3164
3169
|
const nativeEvent = event;
|