Skip to content
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

I can't select any elements on the canvas #7879

Closed
adominguez opened this issue Apr 11, 2024 · 36 comments · Fixed by #7881
Closed

I can't select any elements on the canvas #7879

adominguez opened this issue Apr 11, 2024 · 36 comments · Fixed by #7881
Assignees

Comments

@adominguez
Copy link

Hi!! I have several elements on my canvas, texts, images... I am trying to select some of them with the mouse and it won't let me select any.

It is as if none of the mouse buttons work on the canvas. However, I can select from the top command palette and the options button.

If I inspect the chrome console it gives me the following error every time I move or click the mouse on the canvas.

image

This error does not occur when I move or click with the mouse in the top command palette.

This code is where the error occurs. I don't know if it has anything to do with it, but I'm posting it in case it helps.

image

Thank you

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

Hello j'ai le même problème que toi, je ne peux rien sélectionner. Je peux faire des formes sans problème mais je ne peux pas les bouger supprimer / écrire / sélectionner des éléments. Je ne sais pas comment faire pour retrouver la mobilité. Hier tout fonctionnait très bien. Tu as une astuce ?

@adominguez
Copy link
Author

I just checked that if I clean the canvas and start from the beginning I don't have any problems, and also, the errors in the chrome inspector disappear

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

Yes j'ai pareil que toi si je pars de zéro c'est ok mais pour tous fiches excalidraw uploader ça ne fonctionne pas c'est chiant parce que j'avais tout paramétré

@adominguez
Copy link
Author

Hello j'ai le même problème que toi, je ne peux rien sélectionner. Je peux faire des formes sans problème mais je ne peux pas les bouger supprimer / écrire / sélectionner des éléments. Je ne sais pas comment faire pour retrouver la mobilité. Hier tout fonctionnait très bien. Tu as une astuce ?

What I'm going to try is to download the canvas in svg and inspect it to see if I see anything strange, but beyond that... no idea.

I imagine it has to be related to the console error that appeared above.

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

Oui je pense que c'est lié à l'erreur que tu as mentionné ci-dessus. Y a surement du avoir une mise à jour ou un truc comme ça. J'ai essayé de changer de navigateur mais rien n'y fait c'est la même chose.

@adominguez
Copy link
Author

Then I'm going to debug the svg, maybe there may be a poorly closed tag or something...

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

Je pense que niveau code tu es 100 fois meilleur que moi si tu trouves la solution je suis chaud

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

J'ai envoyé un mail au support pour voir

@PabloLigeroIsla
Copy link

PabloLigeroIsla commented Apr 11, 2024

Same here!

Shortcuts (as Ctrl + a) also work.

Thanks @Nicbib and @adominguez

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

Merci pour ton retour @PabloLigeroIsla tu as une astuce pour éviter de tout sélectionner avec des raccourcis ?

@PabloLigeroIsla
Copy link

No @Nicbib . Sorry. I also try to select just groups of elements. But was not possible.

Another interesting addition,

  • This is NOT happening in all of my boards in Excalidraw. Just in some of them.
  • If a copy paste all the elements from an old Excalidraw which has the bug to a new one (clean new), the bug is reproduced again.

I didn't identify the combination of elements that cause the bug.

@bepintocosta
Copy link

Hi everyone.
I have the same problem too.

@erik-vo
Copy link

erik-vo commented Apr 11, 2024

Same here!

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

Toujours pas de nouvelles du support quelqu'un à réussi à avancer ?

@adominguez
Copy link
Author

As I see, new commits have been added 3 hours ago, I don't know if there could be a problem in any of those files, perhaps the problem can be narrowed down #7876

@adominguez
Copy link
Author

Toujours pas de nouvelles du support quelqu'un à réussi à avancer ?

Nothing... For now, I'm going to open a new canvas and continue working there while this is being fixed, and once it's fixed, I'll transfer the changes from one to the other. At least that way I can keep making progress.

@mbbertolini
Copy link

mbbertolini commented Apr 11, 2024

****The files that have graphics generated by me are not allowing me to select any object in the drawing.
I have a set of artifacts that, if I could no longer use them due to any changes made there, would cause enormous harm to my work using the solution. I ask for support to resolve the issue.

@martin-blaus
Copy link

Im having the same issue, a null pointer on the p4 since its undefined, can't find the elements in the exported json (.excalidraw) to fix it.

Any solution? I dont want to lose my work

@adominguez
Copy link
Author

I just started a new canvas, and I've encountered the same problem again when trying to add an object from a library. That might be where the issue lies.

image

Perhaps now it's asking for some new property or something specific that these objects don't have, and that might be where the error is coming from.

If I undo (Ctrl + Z) and remove the added element, everything works correctly. So, it must be an issue with the objects being added to the canvas.

@gitdenison
Copy link

Hey guys! I have the same problem. I need to continue work on my screen and it doesn't allow editing. I am desperate! I eagerly await the correction.

@Fobhep
Copy link

Fobhep commented Apr 11, 2024

I can confirm the observation regarding adding library objects. I think this is triggering the error

@emanuelelongo
Copy link

emanuelelongo commented Apr 11, 2024

Same problem.
The only workaround I found is to import a backup file of my drawing on Obsidian end working there with the Excalidraw plugin.

@PabloLigeroIsla
Copy link

Workaround:

Is posible to open and edit the .excalidraw files with the bug using the Excalidraw Plugin of VSCode.

https://marketplace.visualstudio.com/items?itemName=pomdtr.excalidraw-editor

I test it and I can select individual elements.

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

Tu peux m'expliquer le process pour le mettre en place sur Mac ?

@zaboco
Copy link

zaboco commented Apr 11, 2024

I have the same issue. I noticed that it happens when I add a closed polygon which doesn't have 3n lines. So 3, 6, 9 is fine; others (4, 5, 8) trigger the error. Don't know if that helps, but it might be a starting point when debugging.

@Fobhep
Copy link

Fobhep commented Apr 11, 2024

Tu peux m'expliquer le process pour le mettre en place sur Mac ?

Et pourquoi pas l'anglais ;) C'est Github, les discussions sont généralement en anglais pour que tout le monde comprenne.

@martin-blaus
Copy link

With the visual studio code plugin works fine, so it must be a newly deployed changed that breaks on undefined p4, p3. Not exactly sure what property are the failed objects missing

@Fobhep
Copy link

Fobhep commented Apr 11, 2024

Intellij plugin works fine as well - in case somebody is using not vscode:
https://plugins.jetbrains.com/plugin/17096-excalidraw-integration

@ryan-di
Copy link
Member

ryan-di commented Apr 11, 2024

Thank you all for reporting and following up on the issue ❤️ We're terribly sorry about the inconvenience this has caused. As @adominguez has correctly pointed out, this bug is caused by the recently merged #7636 refactor on geometry.

Looking into it now! Hope to get back to you soon with a fix!

@dwelle
Copy link
Member

dwelle commented Apr 11, 2024

Hi, we've reverted the deployment for now.

@sanghel-orbyta
Copy link

sanghel-orbyta commented Apr 11, 2024

Hi, we've reverted the deployment for now.

Can confirm, seems to be working now.

I only saw the issue with items from a specific library .
I don't know your architecture, but perhaps the sentry key issue is caused by some libraries only (perhaps those employing analytics in some way...)

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

Ca remarche chez vous ? Car moi pas du tout

@Nicbib
Copy link

Nicbib commented Apr 11, 2024

C'est bon ça remarche

@gitdenison
Copy link

Hi, we've reverted the deployment for now.

Thank you, now it's ok!

@ryan-di
Copy link
Member

ryan-di commented Apr 11, 2024

For those who are interested/affected, with lines, if the first point and the last point meet, it would form a closed shape.
image

For hit testing, that is to check if the pointer hits a given element, we approximate closed lines with polygons. When the lines are curved/round, we use the package points-on-curve to sample points along the curve to form a closed polygon. The functions inside the package therefore assume the given points to meet certain criteria.

But when the lines are sharp, there's no need to refer to points-on-curve and we should just form the polygon directly. And since incorrect points were given to points-on-curve, it threw.

There's a fix already but we want to test it more thoroughly before we reintroduce the refactor into the codebase. Again, our apologies!

@adominguez
Copy link
Author

Thank you very much, I just checked and indeed it's working now. 👏🏼👏🏼👏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.