PencilCode / jquery-turtle

Turtle Graphics for JQuery
Other
44 stars 25 forks source link

Added submit button to read and readnum, added type=number to readnum #97

Closed maiadeutsch closed 9 years ago

maiadeutsch commented 9 years ago

@davidbau note that the submit button doesn't actually need to have any handlers, since the input box already submits on blur.

maiadeutsch commented 9 years ago

@davidbau Travis CL seems to have failed but it doesn't seem related to my pull request at all, it might need to be re-run

davidbau commented 9 years ago

Cool. Can you go ahead and add a handler to the button also? I think right now it's impossible to submit an empty string, but adding a handler would allow it.

maiadeutsch commented 9 years ago

Done. I changed it so that now you submit the answer by either pressing enter or clicking the submit button. Before, the answer used to submit on a change event from the textbox, which could trigger premature submissions (e.g. starting to type something, looking something up, then typing the rest of the answer).

davidbau commented 9 years ago

Nice; thanks. I think that's a good choice.

davidbau commented 9 years ago

Hi Amit - the travis tests are failing I think legitimately. Can you adjust the unit test for input/output to click the submit button at the proper time? It's probably assuming that it can submit by blurring focus.

davidbau commented 9 years ago

I've gone ahead and fixed the test in my own branch and merged it.