Skip to content

Commit 6ea53f6

Browse files
authored
Merge pull request scratchfoundation#4637 from paulkaplan/remove-auto-select
Remove focus selecting in slider prompt
2 parents c5b5931 + f72d0b5 commit 6ea53f6

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/components/slider-prompt/slider-prompt.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ const SliderPromptComponent = props => (
4545
type="text"
4646
value={props.minValue}
4747
onChange={props.onChangeMin}
48-
onFocus={props.onFocus}
4948
onKeyPress={props.onKeyPress}
5049
/>
5150
</Box>
@@ -60,7 +59,6 @@ const SliderPromptComponent = props => (
6059
type="text"
6160
value={props.maxValue}
6261
onChange={props.onChangeMax}
63-
onFocus={props.onFocus}
6462
onKeyPress={props.onKeyPress}
6563
/>
6664
</Box>
@@ -97,7 +95,6 @@ SliderPromptComponent.propTypes = {
9795
onCancel: PropTypes.func.isRequired,
9896
onChangeMax: PropTypes.func.isRequired,
9997
onChangeMin: PropTypes.func.isRequired,
100-
onFocus: PropTypes.func.isRequired,
10198
onKeyPress: PropTypes.func.isRequired,
10299
onOk: PropTypes.func.isRequired
103100
};

src/containers/slider-prompt.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ class SliderPrompt extends React.Component {
2727
handleKeyPress (event) {
2828
if (event.key === 'Enter') this.handleOk();
2929
}
30-
handleFocus (event) {
31-
event.target.select();
32-
}
3330
handleOk () {
3431
const {minValue, maxValue} = this.state;
3532
if (!this.validates(minValue, maxValue)) {
@@ -64,7 +61,6 @@ class SliderPrompt extends React.Component {
6461
onCancel={this.handleCancel}
6562
onChangeMax={this.handleChangeMax}
6663
onChangeMin={this.handleChangeMin}
67-
onFocus={this.handleFocus}
6864
onKeyPress={this.handleKeyPress}
6965
onOk={this.handleOk}
7066
/>

0 commit comments

Comments
 (0)