Client-side image maps in Firefox.

最近發現了 Firefox (也許應該說 Gecko-based browsers?) 在處理 Client-side image maps 時有問題。

  • 不論是 img 還是 object element ,當 usemap attribute 指向的 URI 只是由 id 指定的時候,會發生找不到該 map element 的情況。但如果是用 name 指定的則無問題。
  • map element 中,如果有 area(a) element 的 shape attribute value 為 default 的情況,則同一層內該 area (a) element 後的所有 area (a) elements 無效。
  • View test cases.

A image of a square, a circle and a rhythm, with a white background.

在 Test cases 裡,上圖的方格、圓形、菱形和空白都分別指向不同的 URI 。 Firefox 和 Mozilla 的情形如上所述; Win/IE 本身就不支援 defaultobject ,但其他一切正常; Opera 則能完美地顯示到。現在希望 Netscape 的用家能幫助測試一下看看來確定是不是 Gecko Engine 的共有問題。

追申:我愈來愈喜歡 Opera 了...=w=。

The Specification

下面主要是關於第一個 Bug 的。

HTML 4 defined the name attribute for the elements a, applet, form, frame, iframe, img, and map. HTML 4 also introduced the id attribute. Both of these attributes are designed to be used as fragment identifiers.

...

Note that in XHTML 1.0, the name attribute of these elements is formally deprecated, and will be removed in a subsequent version of XHTML.

cite XHTML 1.0: 4.10. The elements with 'id' and 'name' attributes

Finally, note that XHTML 1.0 has deprecated the name attribute of the a, applet, form, frame, iframe, img, and map elements, and it will be removed from XHTML in subsequent versions.

cite XHTML 1.0: C.8. Fragment Identifiers

2. On the a and map elements, the name attribute has been removed in favor of the id attribute.

cite XHTML 1.1 - Changes from XHTML 1.0 Strict

有點嚴重罷,這個。

Comments

  1. netscape和firefox一樣有相同問題._.

    ReplyDelete
  2. 感謝...。

    這樣就可以確定是 Gecko Engine 的問題了。

    ReplyDelete

Post a Comment