Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Rendering bug - Nested HREF tags created at runtime?

  • 1 trả lời
  • 15 gặp vấn đề này
  • 23 lượt xem
  • Trả lời mới nhất được viết bởi bmoshe

more options

Some code is not rendered correctly at runtime - Firefox creates additional code at runtime which is not present in the source HTML.

A series of A HREF tags are added to code which is nested within a single A HREF tag in the source. It also adds _moz-rs-heading="" within the A, before the HREF property.

It only happens in Windows Firefox (not OS X) and only to a single item in a page - the item affected varies.

If you refresh the page a few times, sometimes it corrects itself.

Doesn't happen in any other browser.

This screenshot (with Firebug enabled) shows the rendering error and the code added at runtime.

Any explanation?

[http://www.rational-systems.net/files/eum/devweb/index.html Some code] is not rendered correctly at runtime - Firefox creates additional code at runtime which is not present in the source HTML. A series of A HREF tags are added to code which is nested within a single A HREF tag in the source. It also adds _moz-rs-heading="" within the A, before the HREF property. It only happens in Windows Firefox (not OS X) and only to a single item in a page - the item affected varies. If you refresh the page a few times, sometimes it corrects itself. Doesn't happen in any other browser. [http://www.rational-systems.net/files/eum/devweb/_notes/scr_web30_bug_moz_article_render.jpg This screenshot] (with Firebug enabled) shows the rendering error and the code added at runtime. Any explanation?

Tất cả các câu trả lời (1)

more options

The explanation will no longer be relevant with Firefox 4 because of the HTML5 support

I'm being here a bit inaccurate in favor of simplifying things.

In HTML, every element is either inline or block, where block elements contain inline elements (e.g., form contains paragraphs). In HTML4, a elements (href) cannot be used as blocks because they were defined as inline (bad judgement call of those W3 guys back at the early days of the Internet). Browsers tend to fix that mistake for you, and my guess is that Firefox chooses its fixing method, based on performance issues (that is, you don't get that problem when making a few such mistakes).

This will no longer be relevant with HTML5 due to a redefinition of the a element (finally). If you want to support HTML4 browsers, you should not have div, h#, table, etc... inside an a element.