Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

plusastab + skipontab #16

Open
camagenta opened this issue Oct 1, 2018 · 1 comment
Open

plusastab + skipontab #16

camagenta opened this issue Oct 1, 2018 · 1 comment

Comments

@camagenta
Copy link

Hi,
is there a way to skip using predefined key like enter, not using default tab key.

when i using plusastab via Static elements the some input that i skip (not using data-plus-as-tab) is stuck and make trigger submiting the form.

case
input 1
input 2
input 3
input 4
..
input 11
input 12
input 13
input 14
..
input 99

I want some input can be skipped using enter for speed purpose. for example, i want to skip input 11 - input 14. can you guide me how to do it using predefined key

@joelpurra
Copy link
Owner

@camagenta: it's been years since I've used these projects for commercial work, so had to do some digging.

In the original (late 2011) project where EmulateTab, SkipOnTab, and PlusAsTab originally were created it all worked together for sure. At the time they weren't standalone libraries (separately open sourced early 2012), so there might have been some custom logic to make both "plussing" and "skipping" work together.

Would also have guessed that I used both plussing and skipping in a presentation/demo (late 2013) I did later. Indeed I did, but the am setting data-plus-as-tab="true" only for a small number of fields -- seems I was aware of this custom plussing key limitation but didn't fix it =/

Unfortunately I presume that SkipOnTab would have to be rewritten to not only check for the tab key, but any custom key defined by options. This part is easy enough to copy from PlusAsTab. I'd worry more about putting tests for PlusAsTab+SkipOnTab together, as they are quite messy (trying to emulate browser behavior) and a bit fragile -- especially on some older browsers.

Sorry, no quick solution for this. Did you find a workaround?

joelpurra added a commit to joelpurra/html-forms that referenced this issue Feb 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants