iframe does not honour :focus pseudo-class

RESOLVED INVALID

Status

()

Core
Layout: HTML Frames
RESOLVED INVALID
16 years ago
14 years ago

People

(Reporter: tan, Assigned: John Keiser (jkeiser))

Tracking

({css2, testcase})

Trunk
Future
css2, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.19pre17 i686)
BuildID:    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011124

when iframes have focus, their style attributes for when they are focused are
not honoured.



Reproducible: Always
Steps to Reproduce:
1. Open the attachment in mozilla
2. Click in the textbox and press tab until you get to the iframe


Actual Results:  Each input element has a style attribute to change the
border-colour when it has focus. This works great, however, the iframe has the
same style attribute, but its border colour does not change even though it is
specified in the style.

Expected Results:  The iframe should honour the focus property in the style tag.
That is, if I were to make a skin, and I put in my global/global.css file,

iframe:focus {
   border-color: #ff0000;
}

then all iframes should change their border change to red when it has focus
(just like it does for all other focusable HTML elements). Currently this does
not happen.
(Reporter)

Comment 1

16 years ago
Created attachment 59499 [details]
Test case for iframe border change

add your own test.html for the iframe src
(Reporter)

Comment 2

16 years ago
Created attachment 59500 [details]
test case for iframe bug

Comment 3

16 years ago
Seems to be OS: All. I don't see a red border on the iframe when it has focus.

Build ID: 2001 11 27 03. Windows 2000.

(But compared to IE 5.5 or Opera 5, Mozilla really stands out. Neither of them
renders the borders of the other gadgets red!)
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
(Reporter)

Comment 4

16 years ago
any idea on a target for this?
Keywords: css2
Summary: iframe does not honour :focus style tag → iframe does not honour :focus pseudo-class
Note: Neither IE or Opera honors iframe:focus

Target Milestone: --- → Future
Bulk re-assigning all of Eric's HTMLFrame bugs to John.
Assignee: eric → jkeiser

Updated

15 years ago
Keywords: testcase
html:focus or body:focus (I do not know which one gets the focus) does not work
either.
It seems that - regarding the testcase - the border color red does not appear
when it receives focus with the tab key. But when you click with the mouse on
the small border area around the iframe, you get the focus and the red border.
> the border color red does not appear when it receives focus with the tab key

That's because the <iframe> never receives focus with the tab key.  If you tab
into it, the focus goes to the canvas of the document in the iframe.

So the :focus pseudo is in fact working correctly...
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.