如何获得-moz-user-focus:忽略工作?

时间:2010-09-08 19:18:51

标签: firefox tabbing

我的理解是,在元素上使用-moz-user-focus: ignoresee doc)时,Firefox应该在标签时跳过该元素。但是,试试:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    </head>
    <body>
        <form action="/">
            <input type="text" value="First">
            <input type="text" value="Second" style="-moz-user-focus: ignore">
            <input type="text" value="Third">
        </form>
    </body>
</html>
  1. 第一次点按标签:您在第一个文字字段。
  2. 第二次点击标签:尽管有-moz-user-focus: ignore,您仍在第二个文字字段中。我在这里错过了什么吗?

1 个答案:

答案 0 :(得分:1)

Mozilla bug基础似乎有一个bug covering this。在修复此错误之前,我们可以使用tabindex="-1"代替CSS作为解决方法。

相关问题