EelcoV / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

tabindex ignored #121

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I use editInPlace to convert HTML span into form elements and all works great. 
I have added tabindicies to the span elements and can TAB between the editable 
items, but as soon as I select (click) the span to make it editable, the 
tabindex functionality vanishes; ie. hitting TAB inside he editInPlace input 
element invariably moves to the SUBMIT button, instead of the next INPUT 
element.

Looking at the source code, there is indeed no handling of tabindex when 
creating the form input element.

Has anybody else encountered this or an easy fix?

Thanks

Original issue reported on code.google.com by jamg...@gmail.com on 5 Nov 2012 at 5:29

GoogleCodeExporter commented 9 years ago
I just "fixed" this by altering the inputNameAndClass method of the 
InlineEditor object by checking for tabIndex of the dom object passed in and 
adding it to the output of that method.

Now TAB forward works, but curiously shift-TAB (backwards) is not working.

Original comment by jamg...@gmail.com on 5 Nov 2012 at 6:21

GoogleCodeExporter commented 9 years ago
Would you mind to share your changes? Moving forward with a tab to the next 
field is exactly what I'd need.

Original comment by hostinsp...@gmail.com on 5 Oct 2014 at 3:47

GoogleCodeExporter commented 9 years ago
    inputNameAndClass: function() {
        var t = $(this.dom).attr('tabindex');
        if(t)
            return ' name="inplace_value" class="inplace_field" tabindex="'+t+'" ';
        else
            return ' name="inplace_value" class="inplace_field" ';
    },

Original comment by jamg...@gmail.com on 5 Oct 2014 at 5:56