Skip to content

Commit

Permalink
fix: when dragging a fader mouseUp could trigger other buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon authored and olzzon committed Apr 2, 2020
1 parent d976aa3 commit 145423e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions client/assets/css/Channel.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
width: 86px;
height: 950px;
position: relative;
touch-action : none;
}

.channel-body.ignore-on {
Expand Down
15 changes: 9 additions & 6 deletions client/components/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
'on': this.props.fader.pgmOn,
'mute': this.props.fader.muteOn
})}
onMouseUp={event => {
onClick={event => {
event.preventDefault()
this.handlePgm();
}}
onTouchEnd={event => {
Expand All @@ -150,14 +151,14 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
'on': this.props.fader.voOn,
'mute': this.props.fader.muteOn,
})}
onMouseUp={event => {
this.handleVo();
onClick={event => {
event.preventDefault()
this.handleVo()
}}
onTouchEnd={event => {
event.preventDefault()
this.handleVo()
}}

>
VO
</button>
Expand Down Expand Up @@ -223,7 +224,8 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
className={ClassNames("channel-ignore-button", {
'on': this.props.fader.ignoreAutomation
})}
onMouseUp={event => {
onClick={event => {
event.preventDefault()
this.handleIgnore();
}}
onTouchEnd={event => {
Expand All @@ -242,7 +244,8 @@ class Channel extends React.Component<IChannelProps & IChannelInjectProps & Stor
className={ClassNames("channel-mute-button", {
'on': this.props.fader.muteOn
})}
onMouseUp={event => {
onClick={event => {
event.preventDefault()
this.handleMute();
}}
onTouchEnd={event => {
Expand Down

0 comments on commit 145423e

Please sign in to comment.