imagemaps inactive if USEMAP attribute contains a filename fragment before the #

VERIFIED DUPLICATE of bug 1882

Status

()

Core
Layout
--
major
VERIFIED DUPLICATE of bug 1882
16 years ago
4 years ago

People

(Reporter: glazou, Assigned: asa)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
1. launch Mozilla
2. open http://daniel.glazman.free.fr/testMAP.htm
3. the first imagemap is inactive because of its USEMAP attribute not beginning
   by '#' or not reduced to a fragment identifyer

This bug blocks linguistic versions of http://www.sncf.com/, the french railways
company. I'll set a dependency to the TechEvangelism bug I filed.

Note : MacIE has same bug :-) :-) :-)
(Reporter)

Comment 1

16 years ago
*** Bug 126973 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 2

16 years ago
Btw, code in nsContextMenu.js lines 226 to 228 is wrong :

   if ( mapName ) {
     // Find map.
     var map = this.target.ownerDocument.getElementById( mapName.substr(1) );

this assumes

(a) that the <map> associated to the image and the image itself are
    in same document
(b) that the USEMAP attribute always starts with a '#'

(Reporter)

Comment 3

16 years ago
Created attachment 70719 [details] [diff] [review]
patch v1.0 c++


This patch solves the bug. It does not contain a fix for the context menu bug
I detected. Will submit another fix about the context menu asap.

Reviews please ?

Comment 4

16 years ago
Comment on attachment 70719 [details] [diff] [review]
patch v1.0 c++

What happens if you have the usemap attribute without the #?
usemap="hello" should work like usemap="#hello", shouldn't it? Does this patch
preserve that behavior?
(Reporter)

Comment 5

16 years ago
Fabian: from my perspective usemap="hello" is NOT an URI targeting
<map name="hello"> ; usemap="#hello" is. Is there a quirk I am not aware of that
makes usemap="hello" working necessary ?

Comment 6

16 years ago
Comment on attachment 70719 [details] [diff] [review]
patch v1.0 c++

just tested IE, usemap="hello" doesn't work either.
so r=fabian
Attachment #70719 - Flags: review+

Comment 7

16 years ago
filing bugs against browser-general without doing a quick search for open bugs 
containing the logical relevant word is mean. please carry your work to the 
nice established bug.

*** This bug has been marked as a duplicate of 1882 ***
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
I am not quite sure if this is a dup, because 1882 does, as I understand it,
want support for imagemaps in other files, while this bug is for making maps
work in the same document with the filename fragment.

(also sending to layout component where 1882 is - though I can't seem to change
the owner of resolved bugs)
Component: Browser-General → Layout
ok. other bugs about this exact issue have been duped to 1882 (e.g. Bug 102851).
verifying.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.