@portabletext/editor 1.48.1 → 1.48.2
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/package.json
CHANGED
|
@@ -173,10 +173,6 @@ export function performEvent({
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
if (actions.some((action) => action.type === 'execute')) {
|
|
176
|
-
// This Behavior now "owns" the event and we can consider the native
|
|
177
|
-
// event prevented
|
|
178
|
-
nativeEventPrevented = true
|
|
179
|
-
|
|
180
176
|
// Since at least one action is about to `execute` changes in the editor,
|
|
181
177
|
// we set up a new undo step.
|
|
182
178
|
// All actions performed recursively from now will be squashed into this
|
|
@@ -184,6 +180,8 @@ export function performEvent({
|
|
|
184
180
|
withUndoStep(editor, () => {
|
|
185
181
|
for (const action of actions) {
|
|
186
182
|
if (action.type === 'effect') {
|
|
183
|
+
nativeEventPrevented = true
|
|
184
|
+
|
|
187
185
|
performAction({
|
|
188
186
|
context: {
|
|
189
187
|
keyGenerator,
|
|
@@ -219,6 +217,8 @@ export function performEvent({
|
|
|
219
217
|
}
|
|
220
218
|
|
|
221
219
|
if (action.type === 'raise') {
|
|
220
|
+
nativeEventPrevented = true
|
|
221
|
+
|
|
222
222
|
performEvent({
|
|
223
223
|
mode: 'raise',
|
|
224
224
|
behaviors,
|
|
@@ -235,6 +235,8 @@ export function performEvent({
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
if (isAbstractBehaviorEvent(action.event)) {
|
|
238
|
+
nativeEventPrevented = true
|
|
239
|
+
|
|
238
240
|
performEvent({
|
|
239
241
|
mode: 'execute',
|
|
240
242
|
behaviors,
|
|
@@ -286,6 +288,8 @@ export function performEvent({
|
|
|
286
288
|
|
|
287
289
|
for (const action of actions) {
|
|
288
290
|
if (action.type === 'effect') {
|
|
291
|
+
nativeEventPrevented = true
|
|
292
|
+
|
|
289
293
|
performAction({
|
|
290
294
|
context: {
|
|
291
295
|
keyGenerator,
|