Skip to content

Commit

Permalink
address prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
potatowagon committed Nov 11, 2024
1 parent fc2b18e commit a71cfb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/lexical-rich-text/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -863,14 +863,14 @@ export function registerRichText(editor: LexicalEditor): () => void {

// Exception handling for iOS native behavior instead of Lexical's behavior when using Korean on iOS devices.
// On other devices, if you backspace during composing, you get a keyCode of 229 (composing state), but on iOS, the behavior is different: it outputs a keyCode of 8 and appends the remnants of the composing character to the previous character.
if (
if (
event.keyCode === 8 &&
navigator.language === 'ko-KR' &&
/iPad|iPhone|iPod/.test(navigator.userAgent)
) {
return false;
}

event.preventDefault();
const {anchor} = selection;
const anchorNode = anchor.getNode();
Expand Down

0 comments on commit a71cfb5

Please sign in to comment.