osx - Tabbing through an HTML form on OS X, any way to force it to stop on all form elements? -


First question here, be gentle. :)

In OS X, tabbing through the HTML form, you will find that it only prevents text boxes and lists. I need it to turn off all form inputs (strictly input s, all the form elements that collect data).

As far as I know, it can be configured only by the system preferences under the keyboard shortcut, but obviously we do not control it ...

Have any ideas? I feel like writing something in jQuery to hate something that feels so despicable.

Thank you

I am obliged to do such a thing to behave safari Want to do The drawback is that you prevent default on normal navigator tabulation, which can be a major problem for access to certain situations. But I doubt it.

  var tab = {}; Tab.i = 1, Tab.items = 0; Function Fix Tabulation () {/ * This can be used for auto-orange tab-indexes, or # has been commented whether this manual tab-index # has already been assigned * / $ ('Input, Select, texture ') each (function () {$ (this) .attr (' tabindex ', Tab.i); Tab.i ++; Tab.items ++;}); Tab.i = 0; / * We need to listen to any forwarded or backward tab # key event where the page is where to focus on the next. * / $ (Document) .on ({'keydown': function (e) {if navigator.appVersion.match ("Safari")) {if (e.keycode == 9 & amp; amp; E.shiftKey) {// Tab key pressed E.Pravant default (); Tab.i! = Tab.itm? Tab.i ++: Tab.i = 1; $ ('Input [tabindex =' '+ tab.i +' "], select [Tabindex =" '+ Tab.i + ""], Teterea [tabindex = "' + Tab.i + '"]') No ('Input [type = "hidden"]'). Focus ();} if (E. Sheet & amp; e.keyCode == 9) {// Tab key pressed e.preventDefault (); Tab .i! = 1? Tab.i--: Tab.i = Tab.items; $ ('Input [tabindex =' + + Tab.i + '], [tabindex = "' + Tab.i + '"] , Select Textera [tabindex = "'+ Tab.i +'"] ". ('Input [type =" hidden "]'). Focus ();}}}}) / / It is necessary if someone clicked on a different part of the # form, Select the clicked input * / $ ('Input [tabindex], select [tabindex], allows to keep tabbed from' teddera [tabindex] '. (' Input [type = "hidden"] '). Function (e) {tab.i = $ (this) .attr ('tabindex'); console.log (Tab.i);});} $ (document) .ready (function () {fixTabulation ();} );  

It is a bit hackneyed, but it is much better than telling your users to change their safari settings in system prefaces, LOs.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -