codewich icon indicating copy to clipboard operation
codewich copied to clipboard

Enhancement request: 'Run' button

Open JamesSkemp opened this issue 8 years ago • 4 comments

While using the online editor I'm running into an issue where it appears the tool is running my code a couple of times quickly, and then no longer allowing me to enter any additional content.

Is it possible to have the editor only run on command, such as via a 'Run' button?

Example where I'm seeing this / that might benefit from a 'Run' button.

JamesSkemp avatar Apr 14 '17 18:04 JamesSkemp

Interesting. It repros for me with that example. I think maybe the code is stealing focus or keypress events from the editor. When it wedges, I'm able to unwedge it by switching between tabs and then back to the TS tab.

I'm not sure a "run" button would really help here, if it is in fact stealing keypresses. One thing you can do is switch in the settings (the gear menu) to "Editor only", then do any editing you want, and then switch back to "auto-run output" (or "output only"). It's certainly not ideal, though.

calebegg avatar Apr 15 '17 21:04 calebegg

I can confirm that switching between tabs works, until the right side refreshes at which point I lose focus again.

I think your workaround of switching the settings to only view the Editor would work.

I was looking at the code to see if I could create a merge request for having a toggle button and noticed that there's already a turnOnAutoRun() in case the output crashes. Perhaps a quick toggle between editor only and output only might be helpful?

JamesSkemp avatar Apr 16 '17 14:04 JamesSkemp

Actually, I realized that a "run" button is pretty trivial to implement as just a user, like so.

calebegg avatar Apr 17 '17 18:04 calebegg

Belatedly, this is great. Thanks!

JamesSkemp avatar Apr 20 '17 23:04 JamesSkemp