See Testpage: http://strickr.de/tests/imagemap.html Der dots on the map are connected via anchor links to entries in a list below: - clicking on a dot scrolls down to entry in list (as expected) - on next click in window (no matter if on link or not) page jumps up again to image (this is not expected) This behaviour is present in current WebKit Nightly (5533.19.4, r72783) and Chrome Beta (8.0.552.210 beta), but not in current Safari (5533.19.4).
Seems likely I broke this with recent image map changes.
A number of users have reported this in Chrome's user forums, too, using Chrome 8.0.552.215. See http://www.menchies.com/locations.php and http://www.longtermcarelink.net/a7homecare.htm for other examples.
If someone else wants to fix this, they are welcome to. I won’t have time to work on it for a while. I’m keeping it assigned to me to remind myself about it.
<rdar://problem/8886118>
I am not so sure this has anything to do with my change. Seems to have something to do with focusing area elements. I did not realize we did that!
I suspect this problem was introduced with r53857.
The bad code seems to be HTMLAreaElement::dispatchBlurEvent.
(In reply to comment #7) > The bad code seems to be HTMLAreaElement::dispatchBlurEvent. I only see this happen, if you first tab to the image map item, then click on it. the following click will then jump back to the image
(In reply to comment #8) > (In reply to comment #7) > > The bad code seems to be HTMLAreaElement::dispatchBlurEvent. > It looks like imageElement->updateFocusAppearance(restorePreviousSelection); that is called from dispatchBlurEvent() -> updateFocusAppearance is causing the scroll back to occur. Since it's a blur event, it seems like it should not be scrolling on the update focus
Yes, that’s right. The problem is that updateFocusAppearance is implemented and used incorrectly in HTMLMapElement. The job of that function, despite its misleading name, is to scroll to reveal the focused element, or something along those lines. HTMLMapElement tries to use it to trigger appropriate repainting of the image element. I’m working on a patch that redoes that map/image focus code to work with a correct model.
Created attachment 80820 [details] Patch
Comment on attachment 80820 [details] Patch r=me
Committed r77313: <http://trac.webkit.org/changeset/77313>
(In reply to comment #13) > Committed r77313: <http://trac.webkit.org/changeset/77313> Will this patch be integrated in Chrome's new version, or what do I have to do to get my imagemap working in Chrome 10.0.648.133? Thanks for the answer.