Closed
Bug 170554
Opened 22 years ago
Closed 19 years ago
HTMLIFrameElement does not have a focus() method
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mjw, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: testcase, Whiteboard: WG needs to make a call)
Attachments
(1 file, 2 obsolete files)
839 bytes,
text/html
|
Details |
When I call focus() on an iFrame an exception is thrown. This doesn't seem like it should occur as the underlying XUL layer can call focus and blur on iframes. When I add focus and blur functions, they too are never called. Sounds like a bug with iframes. I will attach a sample
Updated•22 years ago
|
Comment 2•22 years ago
|
||
See http://www.w3.org/TR/2002/CR-DOM-Level-2-HTML-20020605/html.html#ID-50708718 -- iframe elements do not have a focus() method in the standard DOM. Over to DOM HTML to decide whether the W3C cares to adjust the spec here or not.
Assignee: joki → jst
Component: DOM Events → DOM HTML
OS: Windows 2000 → All
QA Contact: vladimire → stummala
Hardware: PC → All
Summary: DHTML iFrame.focus() → HTMLIFrameElement does not have a focus() method
Whiteboard: WG needs to make a call
Workaround: instead of calling 'select.add( option )', call 'select[select.length] = option'. Seems to work for the time being.
Severity: normal → minor
Comment 5•22 years ago
|
||
How about undoing the Severity change you made too, eh?
Severity: minor → normal
Comment 6•22 years ago
|
||
I don't believe you are supposed to be focusing the iframe, you are supposed to be focusing the iframe contentWindow. So: document.getElementById("iframename").contentWindow.focus(); Of course, this doesn't work either, and it has serious implications for Midas (editor within Mozilla). You can't focus an iframe when it is in edit mode.
Severity: normal → enhancement
Comment 7•22 years ago
|
||
This testcase is timing based and easier to see. After five seconds, focus should move to the iframe. It doesn't. Works in IE and should work in Mozilla. You get no errors in the Javascript console. Note the fact that the IFRAME is in designMode has nothing to do with this. I did that so it would be more obvious that focus switched to the IFRAME.
Attachment #100429 -
Attachment is obsolete: true
Updated•22 years ago
|
Severity: enhancement → major
Comment 8•22 years ago
|
||
Ooops - previous test was 10 second, not 5 so text in testcase didn't match.
Attachment #110993 -
Attachment is obsolete: true
Comment 10•19 years ago
|
||
The test case worksforme in Deer Park Alpha 2. Marking so.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•