Bug 90717 - Inconsistent image map focus display with position:absolute
Summary: Inconsistent image map focus display with position:absolute
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-06 21:09 PDT by wf
Modified: 2012-09-12 05:59 PDT (History)
3 users (show)

See Also:


Attachments
the test page (1.08 KB, text/html)
2012-07-06 21:10 PDT, wf
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description wf 2012-07-06 21:09:08 PDT
if the img has style=position:absolute ,the focus on map doesn't display
Comment 1 wf 2012-07-06 21:10:29 PDT
Created attachment 151130 [details]
the test page
Comment 2 Alexey Proskuryakov 2012-07-07 01:16:22 PDT
Could you please elaborate on what the bug is? On the attached test case, I cannot see any difference between Safari and Firefox.
Comment 3 wf 2012-07-07 01:32:33 PDT
(In reply to comment #2)
> Could you please elaborate on what the bug is? On the attached test case, I cannot see any difference between Safari and Firefox.

Using firefox or ie,the focus can be drawn when you press tab ,but Safari can't.
Comment 4 wf 2012-07-07 01:41:35 PDT
if change 
<img src="blank.png" width="200px;" height="60px;" border="0" usemap="#Map" style="position:absolute; z-index:3; top: 0px; left: 64px; height: 113px; width: 211px;">

to

<img src="blank.png" width="200px;" height="60px;" border="0" usemap="#Map" style="z-index:3; top: 0px; left: 64px; height: 113px; width: 211px;">

the focus can be drawn.
Comment 5 Alexey Proskuryakov 2012-07-08 13:03:42 PDT
> Using firefox or ie,the focus can be drawn when you press tab ,but Safari can't.

This doesn't happen for me in Firefox 13.0.1 for Mac.

I can reproduce that Safari changes behavior when position:absolute is removed, which does make it look like there is a bug somewhere (Firefox still doesn't draw focus).
Comment 6 Bruno Abinader (history only) 2012-09-12 05:59:43 PDT
Please have a look at what w3schools says about absolute positioning:

"Absolutely positioned elements are removed from the normal flow. The document and other elements behave like the absolutely positioned element does not exist."
http://www.w3schools.com/Css/css_positioning.asp

That said, the current behavior is correct (since elements with absolute positioning are removed from the normal flow). You can achieve the intended behavior by removing the "position: absolute" style and adding some JavaScript to fix the object on a specific spot of the screen, for example.

This is also valid for bug 94707, thus marking both as WONTFIX.