-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Remove copy & paste from context menu on desktop #2872
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/excalidraw/excalidraw/ku8z1d92e |
I think you should move the helper over to I'd also factor out this part and reuse in both places: Lines 13 to 19 in ed0bec4
|
Just noticed this. I'm on it! |
I've moved the helper to |
I meant something like factoring this part out:
into a helper called which you'd then call in both of those places where you need it. |
src/components/App.tsx
Outdated
@@ -3630,7 +3630,7 @@ class App extends React.Component<ExcalidrawProps, AppState> { | |||
|
|||
const elements = this.scene.getElements(); | |||
const element = this.getElementAtPosition(x, y); | |||
const isMobile = getWhetherMobile(); | |||
const isMobile = getIsMobileMatcher().matches; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we still can (should) export const isMobile => getIsMobileMatcher().matches
instead.
My suggestion above was incorrect, it should have been a function (well what I suggested wasn't even syntactically correct). Fixed. |
Made into |
Perfect! |
Thanks! ❤️ |
Fixes #2868