Target can be either grooveKnob or its container

pull/10616/head
Luke Morris 2017-08-11 19:27:35 -07:00
parent 751c008b90
commit f53b83ba06
1 changed files with 7 additions and 2 deletions

View File

@ -89,6 +89,7 @@ class OptIn extends Component {
return e => { return e => {
if ( if (
e.target.id !== this.grooveKnob.id && e.target.id !== this.grooveKnob.id &&
e.target.id !== this.grooveKnobContainer.id &&
this.isCustomValueInputFocused this.isCustomValueInputFocused
) { ) {
this.considerResetCustomValue() this.considerResetCustomValue()
@ -148,10 +149,14 @@ class OptIn extends Component {
<div <div
className="opt-in--groove-knob-container" className="opt-in--groove-knob-container"
id={this.id} id={this.id}
ref={el => (this.grooveKnob = el)} ref={el => (this.grooveKnobContainer = el)}
onClick={this.handleClickToggle()} onClick={this.handleClickToggle()}
> >
<div className="opt-in--groove-knob" /> <div
className="opt-in--groove-knob"
id={this.id}
ref={el => (this.grooveKnob = el)}
/>
</div> </div>
<div <div
className="opt-in--left-label" className="opt-in--left-label"