From f95a296bd046a75c7f29313afd24f357e9e06ee2 Mon Sep 17 00:00:00 2001 From: sahejkm Date: Thu, 16 May 2024 18:50:21 +0800 Subject: [PATCH] fix test --- .../lexical-playground/__tests__/e2e/TextFormatting.spec.mjs | 1 + packages/lexical/src/LexicalEvents.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/lexical-playground/__tests__/e2e/TextFormatting.spec.mjs b/packages/lexical-playground/__tests__/e2e/TextFormatting.spec.mjs index 034a6d0fcdf..281a84444aa 100644 --- a/packages/lexical-playground/__tests__/e2e/TextFormatting.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/TextFormatting.spec.mjs @@ -1142,6 +1142,7 @@ test.describe('TextFormatting', () => {
Yellow flower in tilt shift lens diff --git a/packages/lexical/src/LexicalEvents.ts b/packages/lexical/src/LexicalEvents.ts index a8c7991edab..fb4bca87979 100644 --- a/packages/lexical/src/LexicalEvents.ts +++ b/packages/lexical/src/LexicalEvents.ts @@ -516,7 +516,7 @@ function $canRemoveText( function isPossiblyAndroidKeyPress(timeStamp: number): boolean { return ( - lastKeyCode === 'PageUp' && + lastKeyCode === 'Dead' && timeStamp < lastKeyDownTimeStamp + ANDROID_COMPOSITION_LATENCY ); }