From 1feaec57e72c0edbefaf81464856656662baf89c Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Sat, 10 Apr 2021 02:38:19 +0100 Subject: [PATCH] Fix incorrect flushChanges check --- src/useEditable.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/useEditable.ts b/src/useEditable.ts index 1a1a776..8f83619 100644 --- a/src/useEditable.ts +++ b/src/useEditable.ts @@ -318,11 +318,7 @@ export const useEditable = ( const flushChanges = () => { state.queue.push(...state.observer.takeRecords()); const position = getPosition(element); - if ( - state.queue.length || - position.position !== state.position!.position || - position.extent !== state.position!.extent - ) { + if (state.queue.length) { disconnect(); const content = toString(element); state.position = position;