sheehan / grails-console

A web-based Groovy console for interactive runtime application management and debugging
Apache License 2.0
78 stars 41 forks source link

Prevent execute from being called multiple times #35

Closed arosenb2 closed 2 years ago

arosenb2 commented 9 years ago

Keydown can allow double fire, which could be a problem for running execute commands. See this article for more information.

davidsawyer commented 9 years ago

:+1:

buildhive commented 9 years ago

sheehan » grails-console #133 SUCCESS This pull request looks good (what's this?)

sheehan commented 9 years ago

Thanks. This is a good idea, but it seems to break the "Meta+return" binding. There's some mention here that meta doesn't work with keyup. I'll look into it a bit more.

arosenb2 commented 9 years ago

Perhaps keypress instead?

buildhive commented 9 years ago

sheehan » grails-console #134 SUCCESS This pull request looks good (what's this?)

sheehan commented 9 years ago

Sorry I've been busy with something else. Doesn't it say in the quirksmode article that keypress has the same issue as keydown?

arosenb2 commented 9 years ago

Sadly yes. Maybe keeping keydown would be better, but having it check when the last time that run was called and allow allow it to run if it had been more than like 1-2 seconds. I'll see what I can come up with when I get some free cycles.

sheehan commented 9 years ago

It may be that we can use keyup and just bind to return and then check the event for ctrl or meta. I'll test that out when I get a chance.