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

Enhancement request: 'Run' button #4

Open
JamesSkemp opened this issue Apr 14, 2017 · 4 comments
Open

Enhancement request: 'Run' button #4

JamesSkemp opened this issue Apr 14, 2017 · 4 comments

Comments

@JamesSkemp
Copy link

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.

@calebegg
Copy link
Owner

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.

@JamesSkemp
Copy link
Author

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?

@calebegg
Copy link
Owner

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

@JamesSkemp
Copy link
Author

Belatedly, this is great. Thanks!

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

No branches or pull requests

2 participants