Skip to content

Commit

Permalink
Prevent double-clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed Feb 9, 2022
1 parent 179c912 commit 90476e1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/viewer/CopyDeckButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ const CopyDeckButton: React.FC<Props> = ({
onClick={(e) => {
e.stopPropagation();
}}
onDoubleClick={(event) => {
// prevent Twitch fullscreen when clicked
event.stopPropagation();
}}
>
<TextArea
value={deckstring}
Expand Down
4 changes: 4 additions & 0 deletions src/viewer/overlay/BobsBuddyUserConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ export default class BobsBuddyUserConfig extends React.Component<Props, State> {
pointerEvents: show ? "all" : "none",
transform: `scale(${this.state.scale}) translateY(-50%)`,
}}
onDoubleClick={(event) => {
// prevent Twitch fullscreen when clicked
event.stopPropagation();
}}
ref={(ref) => (this.ref = ref)}
>
<li>
Expand Down
4 changes: 4 additions & 0 deletions src/viewer/overlay/DeckList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ class DeckList extends React.Component<
}
this.props.onMoveStart && this.props.onMoveStart(e);
}}
onDoubleClick={(event) => {
// prevent Twitch fullscreen when clicked
event.stopPropagation();
}}
onMouseUp={(e) => {
this.props.onMoveEnd && this.props.onMoveEnd(e);
}}
Expand Down

0 comments on commit 90476e1

Please sign in to comment.