Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltips/Highlight/Select incorrect when AREA shape attribute is missing or its value is non-conforming/empty #170

Closed
RWAP opened this issue Nov 27, 2013 · 2 comments · Fixed by #371
Labels
Milestone

Comments

@RWAP
Copy link

RWAP commented Nov 27, 2013

For some reason, if you have ModPagespeed enabled, with the elide_attributes filter enabled, this impacts on ImageMapster.

I have a site which uses two images to show a highlighted area onclick or on mouseover.

This works fine under ImageMapster.

However, if elide_attributes is enabled - the highlighted area is not shown in Google Chrome or FIrefox (IE10 still shows it successfully).

See https://developers.google.com/speed/pagespeed/module/filter-attribute-elide

Even more oddly - it seemed to work after a while on Firefox when using 2 GIF images, but not when using two PNG images.

No errors are shown in Firebug, so it is difficult to guess which stripped attribute is causing the problem!

@RWAP
Copy link
Author

RWAP commented Nov 28, 2013

I wonder whether this may be because the elide_attributes filter removes shape="rect" from the area map definitions - this is of course the browser default shape, so should be assumed where this attribute is not present

@techfg techfg added the bug label Feb 5, 2021
@techfg
Copy link
Collaborator

techfg commented Feb 5, 2021

@RWAP -

Thank you for reporting this, apologies for the delayed reply!

Your analysis is correct - there is a bug in IM that does not account for shape attributes that have non-confirming/missing values. In your situation, since elide_attributes is "removing" the shape="rect" because its the default, when IM parses the HTML, it should apply rect as the default shape since its missing according to the AREA element spec.

There are actually a few places where IM doesn't currently account for missing/non-confirming values so I've adjusted the title of this issue to reflect as much and marked it as a bug.

Fix will be forthcoming in next release, thank you again for reporting this!

@techfg techfg changed the title ModPagespeed elide_attributes breaks ImageMapster Tooltips/Highlight/Select incorrect when AREA shape attribute is missing or its value is non-conforming/empty Feb 5, 2021
@techfg techfg added this to the 1.5.2 milestone Feb 5, 2021
@techfg techfg mentioned this issue Feb 14, 2021
techfg added a commit that referenced this issue Feb 14, 2021
Resolves #137 - fix handling of href attribute empty/missing
Resolves #170 - fix missing/non-conforming shape attribute
Resolves #364 - fix uncaught promise when mouseoutDelay -1
Resolves #365 - fix selected state when `staticState === true`
Resolves #366 - fix selected state when `staticState === false`
Resolves #367 - fix options not correctly applied when calling set/selected API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants