Issue metadata
Sign in to add a comment
|
links don't open in iframe after renaming it to match target attribute
Reported by
d66n...@gmail.com,
Sep 20 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36 Steps to reproduce the problem: 1. I've created simple html page (see attachment), which contains a simple script that enables to rename iframe (change its "name" property) to match target attribute of a link (<a> element). 2. click the button labeled "RENAME" in order to change the "name" property of "iframe" object. 3. if you click the link after iframe's name has already changed, link still opens in new tab, instead of oppening in iframe. What is the expected behavior? after iframe's "name" property hass changed so that it matches target attribute of <a> element, link must open in iframe. What went wrong? after changing iframe's "name" property to one matching the "target" attribute of <a> element, link still opens in new tab. Did this work before? N/A Chrome version: 61.0.3163.91 Channel: stable OS Version: 6.3 Flash Version: In Firefox browser link opens in iframe after changing its "name" property.
,
Sep 20 2017
At first I guessed it is an HTTP X-Frame-Options[1] issue, but it seems the site the example used (https://www.google.com/chrome) doesn't return X-Frame-Options header. So this is an issue of "target"/"name" attribute interpretation when it is dynamically changed? [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
,
Sep 21 2017
If iframe's name initialy matches target attribute, chrome opens link in iframe, but if you change iframe's name chrome ignores the fact that name has changed and keeps opening link in iframe with changed name no longer matching target attribute.
,
Sep 22 2017
d66n...@, thanks for the update. Sure, this looks like a bug when iframe's target name changes dynamically. This might be related to loading, so widening the scope so this will be triaged properly.
,
Oct 1 2017
It's because changes to the iframe name attribute after the subframe is already created don't actually change the browsing context name. =( |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by kochi@chromium.org
, Sep 20 2017