Open
Bug 131784
Opened 24 years ago
Updated 3 years ago
missing iframe onfocus
Categories
(Core :: DOM: Events, defect, P5)
Core
DOM: Events
Tracking
()
NEW
People
(Reporter: thiago, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: access, testcase, Whiteboard: INVALID?)
Attachments
(3 files, 3 obsolete files)
iframes has no onFocus event, and afaik it should have..
I don´t have an url for this, but its simple to test, just put an alert at the
iframe onFocus.
Comment 1•24 years ago
|
||
events
Assignee: jkeiser → joki
Status: UNCONFIRMED → NEW
Component: HTMLFrames → DOM Events
Ever confirmed: true
OS: Windows XP → All
QA Contact: amar → vladimire
Hardware: PC → All
Comment 2•24 years ago
|
||
onBlur doesn't work too, even though both are specified in
http://www.mozilla.org/xpfe/xulref/iframe.html
Attaching a testcase for these and (commented out) all the others supported by
other browsers.
Comment 3•23 years ago
|
||
Updated•23 years ago
|
Priority: -- → P3
Comment 4•23 years ago
|
||
Build ID: 2003021308
OS: Windows 2000 Server
This sort of works. Clicking inside the iframe doesn't trigger the events, but
clicking on the small grey border around the iframe first triggers the blur
event, and then triggers the focus event. Clicking somewhere else triggers only
the blur event.
I am developing an app where I have some elements of a form inside iframes, so
that they are reloaded when something else changes in the form. Problem is that
iframes participate in the "Tab-cycles-input-elements-of-forms". To solve this I
have an onfocus event on the iframe which when triggered puts the focus on the
first item inside the iframe. This works with IE, but not with Mozilla.
Comment 6•21 years ago
|
||
As mentioned in comment #4, clicking on the border surrounding an iframe will
trigger onfocus event handler. Also, if you give a padding to iframe, you'll
easily see that clicking in that padding area triggers the iframe's onfocus
event handler. Though the onfocus event for iframe will not be fired when
tabbing or shift-tabbing to it.
"This [onfocus] attribute may be used with the following elements: A, AREA,
LABEL, INPUT, SELECT, TEXTAREA, and BUTTON."
http://www.w3.org/TR/html401/interact/scripts.html#adef-onfocus
So, Mozilla does not have to support onfocus for iframe, even though it kinda
supports it, at least internally.
Same thing with Opera 7.x's "Show Active frame border setting
(Preferences.../Page Style): When you view framed pages, the currently active
frame will always be outlined."
Severity: major → normal
Comment 7•21 years ago
|
||
Attachment #84514 -
Attachment is obsolete: true
Comment 8•21 years ago
|
||
Load this document.
Then try clicking, tabbing, shift-tabbing, etc.
Comment 9•21 years ago
|
||
*** Bug 253498 has been marked as a duplicate of this bug. ***
Updated•21 years ago
|
Assignee: joki → events
Comment 10•20 years ago
|
||
*** Bug 321263 has been marked as a duplicate of this bug. ***
Comment 11•20 years ago
|
||
I agree that W3C recomendation to event focus in HTML documents may be used with the following elements: A, AREA, LABEL, INPUT, SELECT, TEXTAREA, and BUTTON, but the same example "Main document of test page" works fine in IE. Doesn't necessary to expand the padding and click it to the iframe has focus.
Are there any idea to fix it and works fine in FF.
Best regards
Comment 12•20 years ago
|
||
<HTML>
<HEAD>
<TITLE>TEST PAGE</TITLE>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY topmargin=0 leftmargin=0>
<IFRAME src='http://www.mypage.org/adsense.html' frameborder='0' width='300' height='50' onFocus='logClick()'></iframe>
<script type="text/javascript">
function logClick() {
window.focus();
bug = new Image();
bug.src = 'http://mypage.org/track.php?pg=' + escape(document.title);
}
</script>
</BODY>
</HTML>
Above javascript code wont work with mozilla, but it work with IE.. Whats wrong? Please help me..
Updated•16 years ago
|
QA Contact: vladimire → events
Comment 13•16 years ago
|
||
Attachment #151852 -
Attachment is obsolete: true
Comment 14•16 years ago
|
||
Attachment #151853 -
Attachment is obsolete: true
Comment 15•16 years ago
|
||
The behavior seems intentional:
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#975
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•