下拉菜单中的表格'Materialize'tabIndex不起作用

时间:2019-04-05 03:34:11

标签: jquery html dropdown materialize

我的登录表单位于下拉菜单中,当我通过按Tab键将其聚焦在用户字段上时,它将关闭。 这不会专注于第二个字段,密码。

我需要类似的东西 closeOnKeyTab:否, allowTab:否, 键盘:假

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">    


<a class='dropdown-trigger hoverColor' href='#' data-target='dropdown1' data-beloworigin="true">Sign Up</a>

<ul class="dropdown-content formLogin" id="dropdown1"
 <div class="input-field col s12">
   <input name="user" id="user" type="text" autocomplete="off" required>
   <label for="user" class="fs15 fw5 gray">User</label>
 </div>
 <div class="input-field col s12">
   <input name="password" id="password" type="password" required>
   <label for="password" class="fs15 fw5 gray">Password</label>
 </div>
</ul>

<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js">
<script type="text/javascript" src="js/jquery/jquery.min.js"></script>
<script type="text/javascript" src="js/materialize/materialize.min.js"></script>
<script>
$('.dropdown-trigger').dropdown({
    closeOnClick: false,
    focusedIndex: true,
    autoTrigger: true,
    isScrollable: true,
});
</script>

0 个答案:

没有答案