From 59fec77c8a4b94074971b0e53127a832f91fb87b Mon Sep 17 00:00:00 2001 From: Aleksandr Shurygin <88888alexandr@gmail.com> Date: Wed, 31 Jul 2019 13:57:32 +0300 Subject: [PATCH] fix bug moving focus in firefox --- src/helpers/drop-events.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/helpers/drop-events.js b/src/helpers/drop-events.js index d1873163c..1831937ca 100644 --- a/src/helpers/drop-events.js +++ b/src/helpers/drop-events.js @@ -13,7 +13,10 @@ function dragOver(e) { } function dragLeave(e) { - e.currentTarget.classList.remove('st-drag-over'); + const blocks = Array.from(document.querySelectorAll('.st-block--textable')) + blocks.map(block => { + block.classList.remove('st-drag-over') + }) e.preventDefault(); e.stopPropagation(); } @@ -34,4 +37,4 @@ module.exports = { return el; } -}; \ No newline at end of file +};