2010-09-08 60 views
0

我的理解是,当在元素上使用-moz-user-focus: ignoresee doc)时,Firefox在切换时应跳过该元素。然而,尝试:如何获得-moz-user-focus:忽略工作?

<!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. 按下Tab键,一个第一次:你在第一个文本框。
  2. 第二次点击标签:尽管-moz-user-focus: ignore处于第二个文本字段。我在这里错过了什么吗?

回答

1

似乎在Mozilla的错误库中有一个bug covering this。在修正此错误之前,我们可以使用tabindex="-1"而不是CSS作为解决方法。