From 63189a371dbe53aadb8aa44a9b68478a1add3dc0 Mon Sep 17 00:00:00 2001 From: Kanstantsin_Vikhor Date: Fri, 1 Mar 2024 16:42:09 +0400 Subject: [PATCH] commented isTrusted check because this might break tests - isTrusted is always 'false' for Cypress-generated clicks --- src/components/modules/ui.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/modules/ui.ts b/src/components/modules/ui.ts index 301d4312..5bab2b88 100644 --- a/src/components/modules/ui.ts +++ b/src/components/modules/ui.ts @@ -611,10 +611,12 @@ export default class UI extends Module { /** * Sometimes we emulate click on some UI elements, for example by Enter on Block Settings button * We don't need to handle such events, because they handled in other place. + * + * PS: Commented this out because it makes this method behave differently in tests. Cypress-generated clicks are having isTrusted == false. */ - if (!event.isTrusted) { - return; - } + // if (!event.isTrusted) { + // return; + // } /** * Close Inline Toolbar when nothing selected * Do not fire check on clicks at the Inline Toolbar buttons