Skip to content

Commit 37a99eb

Browse files
author
Ives van Hoorne
committed
Fix TouchEvent handler
1 parent 0bf7b56 commit 37a99eb

File tree

1 file changed

+3
-4
lines changed
  • src/app/components/sandbox/Preview/DevTools

1 file changed

+3
-4
lines changed

src/app/components/sandbox/Preview/DevTools/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,10 @@ export default class DevTools extends React.PureComponent<Props, State> {
210210
};
211211

212212
handleTouchEnd = (event: TouchEvent) => {
213-
if (event.touches && event.touches.length) {
214-
this.handleMouseUp(normalizeTouchEvent(event));
215-
}
213+
this.handleMouseUp(event);
216214
};
217215

218-
handleMouseUp = (e: Event & { clientX: number, clientY: number }) => {
216+
handleMouseUp = (e: Event) => {
219217
if (this.state.mouseDown) {
220218
this.setState({ mouseDown: false });
221219
this.props.setDragging(false);
@@ -333,6 +331,7 @@ export default class DevTools extends React.PureComponent<Props, State> {
333331
<Tooltip
334332
style={{ pointerEvents: hidden ? 'none' : 'initial' }}
335333
title={title}
334+
key={title}
336335
>
337336
<Icon
338337
style={{

0 commit comments

Comments
 (0)