Closed Bug 112364 Opened 23 years ago Closed 21 years ago

iframe does not honour :focus pseudo-class

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Future

People

(Reporter: tan, Assigned: john)

Details

(Keywords: css2, testcase)

Attachments

(2 files)

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.
add your own test.html for the iframe src
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
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
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
Closed: 21 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: