Closed Bug 612188 Opened 15 years ago Closed 4 years ago

target="_content" targets the content area, not an iframe with that name

Categories

(Core :: DOM: Events, defect)

defect
Not set
major

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox94 --- unaffected

People

(Reporter: ratboy, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7 Build Identifier: 3.6.10 An IFrame will not work if it has an underscore in the name attribute; this should be supported since other browsers do not have an issue with this. Reproducible: Always Steps to Reproduce: 1.Create a page with a simple hyperlink pointing to an iframe with the name _content. 2.Load the page. 3.Click the link and the page will not open in the iframe. Actual Results: Page opens in the browser window rather than the inline-frame. Expected Results: The link should be opened in the inline-frame. Not affected by doctypes or anything like that.
Names starting with underscore are reserved names for frames; using them in your HTML as actual frame names is invalid. In particular, some values starting with underscore are magical (see _blank, _top, etc). _content is one of those; it means "the browser content area". It looks like the current HTML5 spec draft says nothing about that; I raised http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-November/029030.html
Summary: IFrame doesn't work with an underscore in the name attribute → target="_content" targets the content area, not an iframe with that name
Ah much thanks; quick response too!
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Well, not quite fixed. Need to see what happens with the spec work, then align with the spec... ;)
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---
bz, did anything ever happen with this? It looks like nobody replied to your email.
It got replies. But they moved their archive.... Try http://lists.w3.org/Archives/Public/public-whatwg-archive/2011Dec/0188.html and replies to that.

Hi,

I'm marking this ticket as Resolved - WFM it looks like this is an outdated issue. The reporter is no longer active and we can't ask them for a test page.
Please reopen it in case this is still active.

Thanks,
Virginia

Status: REOPENED → RESOLVED
Closed: 15 years ago4 years ago
Resolution: --- → WORKSFORME

Fwiw, testcase is:

data:text/html,<a target="_content" href="http://example.com">Load example.com in iframe</a><iframe name="_content"></iframe>

Attached image Capture 612188.JPG

Thank you for providing more information. I'm attaching a screenshot where I try opening wikipedia page inside the iframe and it's showing as expected. I tested this on Firefox Nightly 94.0a1 (2021-09-28) (64-bit).
In case you are still able to reproduce this on your end, please reopen this ticket and provide more info so we can continue investigating.

Regards,
Virginia

Component: General → DOM: Events
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: