Closed Bug 126982 Opened 23 years ago Closed 23 years ago

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

Categories

(Core :: Layout, defect)

defect
Not set
major

Tracking

()

VERIFIED DUPLICATE of bug 1882

People

(Reporter: glazou, Assigned: asa)

References

()

Details

Attachments

(1 file)

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 :-) :-) :-)
*** Bug 126973 has been marked as a duplicate of this bug. ***
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 '#'

Attached patch patch v1.0 c++Splinter Review
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 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?
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 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+
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
Closed: 23 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.

Attachment

General

Created:
Updated:
Size: