stevermeister/ngWig

go to next ngWig with tab key

Opened this issue · 7 comments

Hello.

I make a lot of questionary, each one having multiples in the same page.

I want to press "tab" key to jump from the content of a to the next to reduce writing time. Taking the following example, to write "question 1", "question 2","question 3" and so on.

enter image description here

https://plnkr.co/edit/dInpEicp5I5p5D1Cnf5w?p=preview

<body>
  <ng-wig ng-model="text1" class="ngwig-sm"></ng-wig>
  <ng-wig ng-model="text2" class="ngwig-sm"></ng-wig>
  <ng-wig ng-model="text3" class="ngwig-sm"></ng-wig>
  <ng-wig ng-model="text4" class="ngwig-sm"></ng-wig>
  <ng-wig ng-model="text5" class="ngwig-sm"></ng-wig>
</body>

Actually the tab key change jump to the next buttons and never to textarea.
Any idea ? thanks

good point!
for some reason, tabindex is missing.
willing to make a PR?

@stevermeister This has been fixed in the latest version 😃 @alainib Try your plunker with v3.0.16 and let us know.

@bampakoa or, really?
I'm already with ngx :)

a bit off-topic
Still thinking about new package solution.
after last ng-be conference, I have a feeling that ng-packagr is exactly what we need.

I updated the plunker with 3.0.16 thanks.
Now it go inside the textarea but in i have to press "tab" for each button of the ng-wig ( in my app i have 9) . So a little bit long and not efficient in my case.
Is there a way to jump from textarea to textarea directly even if it is not clean code ?

In all case thanks for the good work

@alainib You can create a plugin for this. Here is a sample plugin that creates a button. You can follow this tutorial and create your own accordingly, which obviously will not be a button 😄

@bampakoa thanks but i already created custom button for other purpose.
I want to do this : when i'm in a textarea of a ng-wig, if i press "tab" button it go to the next ng-wig textarea , actually it go to the next button, so i have to press tab 9 times before i fall inside the textarea.
I'm trying to improve only this .
Thanks

@alainib I think that you still need a plugin for the behavior that you describe. If you need any help on that, ping me.