Merge pull request #4637 from paulkaplan/remove-auto-select
Remove focus selecting in slider prompt
This commit is contained in:
2 files changed
-7
No files matched your search
@@ -45,7 +45,6 @@ const SliderPromptComponent = props => (
|
||||
type="text"
|
||||
value={props.minValue}
|
||||
onChange={props.onChangeMin}
|
||||
onFocus={props.onFocus}
|
||||
onKeyPress={props.onKeyPress}
|
||||
/>
|
||||
</Box>
|
||||
@@ -60,7 +59,6 @@ const SliderPromptComponent = props => (
|
||||
type="text"
|
||||
value={props.maxValue}
|
||||
onChange={props.onChangeMax}
|
||||
onFocus={props.onFocus}
|
||||
onKeyPress={props.onKeyPress}
|
||||
/>
|
||||
</Box>
|
||||
@@ -97,7 +95,6 @@ SliderPromptComponent.propTypes = {
|
||||
onCancel: PropTypes.func.isRequired,
|
||||
onChangeMax: PropTypes.func.isRequired,
|
||||
onChangeMin: PropTypes.func.isRequired,
|
||||
onFocus: PropTypes.func.isRequired,
|
||||
onKeyPress: PropTypes.func.isRequired,
|
||||
onOk: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
@@ -27,9 +27,6 @@ class SliderPrompt extends React.Component {
|
||||
handleKeyPress (event) {
|
||||
if (event.key === 'Enter') this.handleOk();
|
||||
}
|
||||
handleFocus (event) {
|
||||
event.target.select();
|
||||
}
|
||||
handleOk () {
|
||||
const {minValue, maxValue} = this.state;
|
||||
if (!this.validates(minValue, maxValue)) {
|
||||
@@ -64,7 +61,6 @@ class SliderPrompt extends React.Component {
|
||||
onCancel={this.handleCancel}
|
||||
onChangeMax={this.handleChangeMax}
|
||||
onChangeMin={this.handleChangeMin}
|
||||
onFocus={this.handleFocus}
|
||||
onKeyPress={this.handleKeyPress}
|
||||
onOk={this.handleOk}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user