Compare commits

...

1 Commits

Author SHA1 Message Date
zsviczian
56d1653d97 reintroduce copy/paste on Apple devices and on touch screens 2022-11-01 10:28:04 +01:00

View File

@ -169,6 +169,7 @@ import {
isArrowKey,
KEYS,
isAndroid,
isDarwin,
} from "../keys";
import { distance2d, getGridPoint, isPathALoop } from "../math";
import { renderScene } from "../renderer/renderScene";
@ -5978,7 +5979,7 @@ class App extends React.Component<AppProps, AppState> {
} else {
ContextMenu.push({
options: [
this.device.isMobile &&
(this.device.isTouchScreen || isDarwin) &&
navigator.clipboard && {
trackEvent: false,
name: "paste",
@ -5990,7 +5991,9 @@ class App extends React.Component<AppProps, AppState> {
},
contextItemLabel: "labels.paste",
},
this.device.isMobile && navigator.clipboard && separator,
(this.device.isTouchScreen || isDarwin) &&
navigator.clipboard &&
separator,
probablySupportsClipboardBlob &&
elements.length > 0 &&
actionCopyAsPng,
@ -6035,9 +6038,11 @@ class App extends React.Component<AppProps, AppState> {
} else {
ContextMenu.push({
options: [
this.device.isMobile && actionCut,
this.device.isMobile && navigator.clipboard && actionCopy,
this.device.isMobile &&
(this.device.isTouchScreen || isDarwin) && actionCut,
(this.device.isTouchScreen || isDarwin) &&
navigator.clipboard &&
actionCopy,
(this.device.isTouchScreen || isDarwin) &&
navigator.clipboard && {
name: "paste",
trackEvent: false,
@ -6049,7 +6054,7 @@ class App extends React.Component<AppProps, AppState> {
},
contextItemLabel: "labels.paste",
},
this.device.isMobile && separator,
(this.device.isTouchScreen || isDarwin) && separator,
...options,
separator,
actionCopyStyles,