From 691889719200f7527316421905562d3fae43a8a8 Mon Sep 17 00:00:00 2001 From: Jason Chen Date: Thu, 18 Jan 2018 01:07:20 -0800 Subject: [PATCH] mitigation for #1910 --- modules/keyboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/keyboard.js b/modules/keyboard.js index f57eaea08d..8959c32b87 100644 --- a/modules/keyboard.js +++ b/modules/keyboard.js @@ -4,7 +4,6 @@ import extend from 'extend'; import Delta from 'quill-delta'; import DeltaOp from 'quill-delta/lib/op'; import Parchment from 'parchment'; -import Embed from '../blots/embed'; import Quill from '../core/quill'; import logger from '../core/logger'; import Module from '../core/module'; @@ -307,6 +306,7 @@ function makeEmbedArrowHandler(key, shiftKey) { return { key, shiftKey, + altKey: null, [where]: /^$/, handler: function(range) { let index = range.index; @@ -314,7 +314,7 @@ function makeEmbedArrowHandler(key, shiftKey) { index += (range.length + 1); } const [leaf, ] = this.quill.getLeaf(index); - if (!(leaf instanceof Embed)) return true; + if (!(leaf instanceof Parchment.Embed)) return true; if (key === Keyboard.keys.LEFT) { if (shiftKey) { this.quill.setSelection(range.index - 1, range.length + 1, Quill.sources.USER);