搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

I see Error border after lose focus on element. Only in firefox. In opera - not have this error.

more options

I see Error border after lose focus on element. Only in firefox. In opera - not have this error.

I see Error border after lose focus on element. Only in firefox. In opera - not have this error.
附加的畫面擷圖

由 IVIuXa 於 修改

所有回覆 (12)

more options

The dotted border can indicate a selection. For example, if you tab through a page, each link will get the dotted border in turn. I'm not sure if that is what's happening... Can you post a link to a page that has this problem?

more options

Wau it is works ! Thanks!

由 IVIuXa 於 修改

more options

Not work again.... This example index.html : you need insert "<" in left

!DOCTYPE html>' html dir="ltr" lang="ru"> head> meta charset="UTF-8" /> script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"> /script> /head> body> table > tr id="e1" tabindex="0"> td > Example1 /td> /tr> tr tabindex="0"> td> Example2 /td> /tr> /table> script> $("#e1").focus(); /script> style> table :focus { background: #DFF0D8; } /style> /body> /html>

由 IVIuXa 於 修改

more options

Sorry, this site is bad with code. Can you set up a demo page using jsfiddle? You can include jquery by using a selector in the left column.

http://jsfiddle.net/

more options

http://jsfiddle.net/L9rck790/2/

But there is no error. $ ("# e1"). focus (); - Operates only in the browser.

Error in (if not see - press update page): https://jsfiddle.net/L9rck790/2/embedded/result/

I set the focus on the first element in javascript code. And the mistake that focus css and javascript focus - two different things in Firefox.

由 IVIuXa 於 修改

more options

The onload doesn't seem to work for me. The focus border and the background color move together, so that's good.

Can you see any difference between the jsFiddle and the real application?

more options

Error in (if not see - press update page): https://jsfiddle.net/L9rck790/2/embedded/result/

more options

That new one actually works well for me. What I mean is, on load Example1 has the background color and focus ring, and if I click Example2, it gets the background color and focus ring. Is that not what you want?

more options

Example2 not focus ring, only the background color

由 IVIuXa 於 修改

more options

Did you click Example2 or press the Tab key, or do you get the same result either way?

more options

I click mouse button. If i click "tab" and click mouse button - this work! But if press reload page - not work again.

more options

I'm sorry, when I test in a new profile without any of my customizations or add-ons, I see the same problem you see. There is something in my regular profile that bypasses the issue but I have no idea what it is.

When either Example1 or Example2 is "focused" if I interrogate the activeElement in the document, I get iframe. There definitely appears to be confusion involved in focusing tr elements.