Summary: | Cannot render focus on the anchor when its child has style "position: absolute" | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | wf <wf> | ||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED WONTFIX | ||||||||
Severity: | Normal | CC: | bruno.abinader, martin.leutelt, mibalan | ||||||
Priority: | P2 | Keywords: | AdobeTracked | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
wf
2012-08-22 07:02:55 PDT
Created attachment 159925 [details]
the test page
Created attachment 159926 [details]
the test page
The node "llinker0" cannot display the focus when press Tab. (In reply to comment #0) > In the test page below, the node "llinker0" cannot be focused. > If delete "position: absolute;" ,the focus can be rendered. > ============================================== > > <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> > <title>test</title> > </head> > > <body> > <br> > <br> > <a name="llinker0" href="#"><img src="nav_up.png" style="position: absolute;top:140px;width: 132px;height: 40px;border: 0"></a> > </body> > </html> I think this is intended behavior. Absolute positioning will remove your image element from the page flow, as a result the a element will have a 0-size and as a result of that the focus outline will not be shown. Firefox shows the same behavior. (In reply to comment #4) > I think this is intended behavior. Absolute positioning will remove your image element from the page flow, as a result the a element will have a 0-size and as a result of that the focus outline will not be shown. Firefox shows the same behavior. Do you have any suggestion to fix this bug? I traced the code,but haven't found any solution. https://bugs.webkit.org/show_bug.cgi?id=90717 may have the same issue. 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. If you all agree, shall we mark it as WONTFIX (same for bug 90717)? (In reply to comment #5) > (In reply to comment #4) > > I think this is intended behavior. Absolute positioning will remove your image element from the page flow, as a result the a element will have a 0-size and as a result of that the focus outline will not be shown. Firefox shows the same behavior. > > Do you have any suggestion to fix this bug? > I traced the code,but haven't found any solution. > > https://bugs.webkit.org/show_bug.cgi?id=90717 > may have the same issue. OK,I agree to mark it as WONTFIX (same for bug 90717). Thanks. (In reply to comment #6) > 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. > > If you all agree, shall we mark it as WONTFIX (same for bug 90717)? > > (In reply to comment #5) > > (In reply to comment #4) > > > I think this is intended behavior. Absolute positioning will remove your image element from the page flow, as a result the a element will have a 0-size and as a result of that the focus outline will not be shown. Firefox shows the same behavior. > > > > Do you have any suggestion to fix this bug? > > I traced the code,but haven't found any solution. > > > > https://bugs.webkit.org/show_bug.cgi?id=90717 > > may have the same issue. Marking as WONTFIX (see commment 6 for details). |