Dear community.
Dear community.
I'm intrigued how CheckVist accomplished the following:
① edit task opens a textarea √
② pressing enter submits √
③ typing Japanese doesn't submit on the first enter key-stroke!!!
I understand 1 and 2, but how do they accomplish 3?
With a normal "text-input" I can accomplish this because enter is the default behaviour to submit the form, and the browser knows to not submit when typing Japanese.
But CheckVist did it with a textarea! A textarea needs a custom way to submit on enter, like a keystroke handler (on keydown or something), but it clashes with typing Japanese........
Does anyone know how they did it?
I'm intrigued how CheckVist accomplished the following:
① edit task opens a textarea √
② pressing enter submits √
③ typing Japanese doesn't submit on the first enter key-stroke!!!
I understand 1 and 2, but how do they accomplish 3?
With a normal "text-input" I can accomplish this because enter is the default behaviour to submit the form, and the browser knows to not submit when typing Japanese.
But CheckVist did it with a textarea! A textarea needs a custom way to submit on enter, like a keystroke handler (on keydown or something), but it clashes with typing Japanese........
Does anyone know how they did it?
Apparently it's possible by using KEYDOWN instead of KEYUP to trigger the enter to submit form.
ReplyDeleteWith keydown on enter it won't be triggered when typing Japanese, unless you do a second enter.
Actually, we didn't do anything special for Japanese, it works by a coincidence. And I'm glad it works correctly for you :)
ReplyDelete