Safari ignoring tabindex

前端 未结 7 1802
野的像风
野的像风 2020-12-07 19:49

I have 2 buttons next to a textbox and another textbox after the 2 buttons. The tabindex for the first textbox is 1000, the first button is 1001 and the second button is 10

7条回答
  •  余生分开走
    2020-12-07 20:21

    Encountered the same issue and had to implement tab navigation programatically. Luckily found this jquery tabbable plugin https://github.com/marklagendijk/jQuery.tabbable and put it to good use, here's

    require('../../node_modules/jquery.tabbable/jquery.tabbable');
    $(document).ready(() => {
      $(document).keydown((event) => {
        if (event.keyCode === 9) {
          window.$.tabNext();
          event.preventDefault();
        }
      });
    });
    

提交回复
热议问题