From ffdd0c4b0b5f9dda6ca3930f1fd5f5eb5d72016c Mon Sep 17 00:00:00 2001 From: Mats Sigge Date: Tue, 12 Mar 2019 15:54:28 +0100 Subject: [PATCH] Fix keyboard-based text selection - don't preventDefault on shift modifier. --- src/Input/BigNumber.elm | 2 +- src/Input/Float.elm | 4 ++-- src/Input/Number.elm | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Input/BigNumber.elm b/src/Input/BigNumber.elm index 26dfb8f..65a8aa3 100644 --- a/src/Input/BigNumber.elm +++ b/src/Input/BigNumber.elm @@ -140,7 +140,7 @@ onKeyDown options currentValue = ( options.onInput currentValue, False ) else if event.shiftKey then - ( options.onInput currentValue, True ) + ( options.onInput currentValue, False ) else if List.any ((==) event.keyCode) allowedKeyCodes then ( options.onInput currentValue, False ) diff --git a/src/Input/Float.elm b/src/Input/Float.elm index 051531e..dcd1ff3 100644 --- a/src/Input/Float.elm +++ b/src/Input/Float.elm @@ -295,7 +295,7 @@ onKeyDownString options currentValue = ( options.onInput currentValue, False ) else if event.shiftKey then - ( options.onInput currentValue, True ) + ( options.onInput currentValue, False ) else if List.any ((==) event.keyCode) allowedKeyCodes then ( options.onInput currentValue, False ) @@ -346,7 +346,7 @@ onKeyDown options currentValue = ( options.onInput currentValue, False ) else if event.shiftKey then - ( options.onInput currentValue, True ) + ( options.onInput currentValue, False ) else if List.any ((==) event.keyCode) allowedKeyCodes then ( options.onInput currentValue, False ) diff --git a/src/Input/Number.elm b/src/Input/Number.elm index 44ecfd6..2e9b2bf 100644 --- a/src/Input/Number.elm +++ b/src/Input/Number.elm @@ -300,7 +300,7 @@ onKeyDownString options currentValue = ( options.onInput currentValue, False ) else if event.shiftKey then - ( options.onInput currentValue, True ) + ( options.onInput currentValue, False ) else if List.any ((==) event.keyCode) allowedKeyCodes then ( options.onInput currentValue, False ) @@ -348,7 +348,7 @@ onKeyDown options currentValue = ( options.onInput currentValue, False ) else if event.shiftKey then - ( options.onInput currentValue, True ) + ( options.onInput currentValue, False ) else if List.any ((==) event.keyCode) allowedKeyCodes then ( options.onInput currentValue, False )