SharpLab icon indicating copy to clipboard operation
SharpLab copied to clipboard

Autocompletion menu functionality is broken, text is deleted instead of inserted

Open eduarddejong opened this issue 8 months ago • 13 comments

When inserting code from the IntelliSense menu, all code from the text cursor to the beginning is completely deleted. Nothing is inserted at all.

The most difficult thing is that it's really hard to avoid, since the menu opens itself frequently and typing characters leads to auto selecting text options in the menu, which already makes the experience really buggy. (That problem exists much longer, in VS and VS Code insertions are never automatically made by typing, only by explicitly confirming the selected item by pressing Enter, but on SharpLab this does not function properly. However, the deletion issue is is new, I haven't noticed that earlier.)

Thanks for this great extension anyway, it's otherwise really useful!

Browser: Firefox

eduarddejong avatar Dec 17 '23 15:12 eduarddejong

Thankfully someone else noticed this. I haven't been to sharplab.io in a while, and when I tried to use it today, I wondered if my keyboard was possessed :). Whatever this behavior is, it's making sharplab.io unusable.

JasonBock avatar Dec 27 '23 20:12 JasonBock

This also seems to happen when typing <, >, or ;, without me seeing autocomplete being involved.

jnm2 avatar Dec 28 '23 16:12 jnm2

This also seems to happen when typing <, >, or ;, without me seeing autocomplete being involved.

Yeah something seems very borked on the site :(

JasonBock avatar Dec 28 '23 16:12 JasonBock

Thanks for reporting! Unfortunately I can't reproduce it (including on Firefox).

Is this on specific branch (main vs Default)? Can you maybe share a recording of the problem?

ashmind avatar Jan 04 '24 20:01 ashmind

This example is reproducible for me: https://sharplab.io/#v2:EYLgtghglgdgNAFxAJwK4wD4AEBMBGAWAChiAxAe3IAoBKAbmKwBYACC6m4gb2Jb5ZgBTAO4sAgrQB0AIQjIqMVABsl9XvyGiJNGRABeC5aoZEAvsQskrlm9bu2H9p45fO3rj+6+fHAZwRoAMYI4izc/GFEEVgAzCzMLLLyWHgADCz+yJxR/Dw5EXwpAJxUAERJpWr5BcVlFVUR5vnqhXEJsgYp6ZnZEXkF/LXl+pUmA4V4JcN6oy0sTaZAA

What I notice: The glitch only seems to happen when running the code and when editing the code makes a "visual jump" during execution. I suspect this is somehow related to the insertion of the three icons image

In this video, see how after commenting out some code, repeatedly pressing right-arrow to move the cursor through the lines, shows that the righmost column on each line where the cursor is placed, corresponds to the righmost column on the line below. https://github.com/ashmind/SharpLab/assets/919634/2c2c69bc-52ae-4515-a015-1b83795fee73

jnyrup avatar Jan 04 '24 22:01 jnyrup

Thanks, I can reproduce this. It might be a bit tricky to resolve (likely an issue in editor component internals), but I'll take a look when I am able.

ashmind avatar Jan 05 '24 21:01 ashmind

By the way, mabe it's also good to check the Visual Basic experience.

Issues are very easy to notice with it.

eduarddejong avatar Jan 24 '24 08:01 eduarddejong

today it won't let me type any thing. Whenever there comes any Auto Suggestion it removes everything upto that point.

One things i also noticed that . Sometimes on reloading full page it works perfectly.

Thus Issue i found while i am using Chrome But i haven't any issue while using Opera

https://github.com/ashmind/SharpLab/assets/48068632/c7667499-7567-4ff1-9b89-5de30bd95c11

PrashantUnity avatar Feb 14 '24 06:02 PrashantUnity

Same issue here but in Chrome.

Phyyl avatar Apr 16 '24 19:04 Phyyl

@ashmind If it's tricky to fix, might disabling the completion be a workable mitigation?

jcouv avatar Apr 17 '24 19:04 jcouv