File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/Form/Inputs/InputText Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 0.9.30]
9+
10+ ### Fixed
11+
12+ - ` InputText ` issue moving cursor and selecting text when input is already focused
13+
814## [ 0.9.29]
915
1016### Fixed
Original file line number Diff line number Diff line change @@ -126,7 +126,8 @@ const InputTextLayout = forwardRef(
126126 // Avoid moving focus if the mousedown was inside a button
127127 // because it will interrupt any onclick behavior
128128 // (the button click handler should be responsible for moving focus)
129- if ( ! targetIsButton ( e ) ) {
129+ // Also no need to do anything if mousedown was on the input itself
130+ if ( ! targetIsButton ( e ) && e . target !== internalRef . current ) {
130131 // set focus to input on mousedown of container to mimic natural input behavior
131132 // need requestAnimationFrame here due to browser updating focus _after_ mousedown is called
132133 if ( document . activeElement === internalRef . current ) {
You can’t perform that action at this time.
0 commit comments