From 8a0be28e0b434e3b9a3c497677f834ba88557482 Mon Sep 17 00:00:00 2001 From: Danny August Ramaputra Date: Thu, 21 Oct 2021 15:58:59 +1000 Subject: [PATCH] fix: overflowed text selection on WebKit --- fableous-fe/src/components/canvas/Canvas.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fableous-fe/src/components/canvas/Canvas.tsx b/fableous-fe/src/components/canvas/Canvas.tsx index 0d572f20..656b122e 100644 --- a/fableous-fe/src/components/canvas/Canvas.tsx +++ b/fableous-fe/src/components/canvas/Canvas.tsx @@ -999,8 +999,8 @@ const Canvas = forwardRef( // disable moving cursor and selection with arrow keys, shift and ctrl+A // by forcing cursor to be at the end onScreenKeyboardRef.current.setSelectionRange( - Number.MAX_SAFE_INTEGER, - Number.MAX_SAFE_INTEGER + onScreenKeyboardRef.current.value.length, + onScreenKeyboardRef.current.value.length ); }} tabIndex={0}