|Summary:||REGRESSION (r53857): Removing focus from area element causes unwanted scrolling|
|Product:||WebKit||Reporter:||Martin Stricker <martin.stricker>|
|Component:||Layout and Rendering||Assignee:||Darin Adler <darin>|
|Severity:||Normal||CC:||ap, cfleizach, darin, gmmail2000-bugzilla, komoroske, tonikitoo|
|Version:||528+ (Nightly build)|
|OS:||OS X 10.5|
Description Martin Stricker 2010-11-29 12:03:39 PST
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).
Comment 1 Darin Adler 2010-11-30 12:20:48 PST
Seems likely I broke this with recent image map changes.
Comment 2 komoroske 2010-12-09 16:09:15 PST
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.
Comment 3 Darin Adler 2011-01-19 11:08:40 PST
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.
Comment 5 Darin Adler 2011-01-31 17:34:04 PST
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!
Comment 7 Darin Adler 2011-01-31 17:49:31 PST
The bad code seems to be HTMLAreaElement::dispatchBlurEvent.
Comment 8 chris fleizach 2011-01-31 18:00:04 PST
(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
Comment 9 chris fleizach 2011-01-31 18:02:19 PST
(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
Comment 10 Darin Adler 2011-02-01 09:27:20 PST
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.
Comment 13 Darin Adler 2011-02-01 14:49:24 PST
Committed r77313: <http://trac.webkit.org/changeset/77313>