New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 674354 link

Starred by 9 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All , Chrome
Pri: 2
Type: Bug



Sign in to add a comment

mailto links do not work within subframes when handled by gmail

Project Member Reported by davidsac@chromium.org, Dec 15 2016

Issue description

Chrome Version: 54.0.2840.101 (64-bit)
OS: ChromeOS (Platform 8743.85.0, Firmware Google_Chell.7820.158.0)

To reproduce the problem:
1) Navigate to http://alexmos17.github.io/tests/mailto.html
2) Click on the mailto link in the subframe.

The expected result:
Gmail is opened in a new tab, with a window created for a new email draft to the recipient corresponding to the mailto link.

Instead:
The link disappears, no new tab or window is created, and an error is logged to the console, stating that the page refused to render because mail.google.com has set 'X-Frame-Options' to 'SAMEORIGIN'.  Basically, it seems that it tries to load gmail within the iframe instead of opening it up in a new tab similar to how other mailto links are handled in ChromeOS.  Note that right-clicking and opening the link in a new tab still works as expected.  

It is also worth noting that even normal mailto links don't seem to work as expected.  Rather than opening gmail in a new tab, they navigate the current page to gmail.  This may want to be reconsidered.  The issue involving subframes would be resolved by default if mailto links opened in a new tab.

 

Comment 1 by nick@chromium.org, Dec 15 2016

Labels: OS-All
This is OS-All, but it affects Cros by default.

Windows repro instructions:

1. Open a tab to gmail.com (and log in)
2. Click the protocol handler icon/chip (two overlapping diamonds) which appears in the right part omnibox.
3. In the popup that appears, select the option to 'Allow' gmail to handle email links.
4. Navigate to http://alexmos17.github.io/tests/mailto.html
5. Click the mailto link in the subframe

Comment 2 by nick@chromium.org, Dec 15 2016

Cc: benwells@chromium.org
Components: UI>Browser>Navigation
+benwells as OWNER of chrome/browser/custom_handlers

This behavior seems to be a consequence of the design decision wherein custom handlers are implemented via a net::URLRequestJobFactory that generates redirects from "mailto:" navigations to the registered https gmail URL. I'm not sure that's the right design here, given that URL requests are not always for top-level navigations.

Note that right clicking on the mailto: link in the subframe, and selecting "open with ... mail.google.com" seems to properly handle this in a new tab.
Can you suggest an alternative design that would fix the problem? We don't really do much work on custom handlers, the design has largely been unchanged for about five years, but if there are simple changes we could make to fix this we could look into it.
Cc: nick@chromium.org
Status: Available (was: Untriaged)
Summary: mailto links do not work within subframes when handled by gmail (was: mailto links do not work within subframes in ChromeOS)
Just came across another old, but possibly related mailto-in-subframes bug:  issue 306349 .
Project Member

Comment 5 by sheriffbot@chromium.org, Feb 16 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 6 by nasko@chromium.org, Feb 21 2018

Labels: -Hotlist-Recharge-Cold
Hmm, I'm not sure what the expected behavior is, but I don't see gmail handling even the link in the main frame. Removing Hotlist-Recharge-Cold, so we can investigate more.
Cc: gbillock@chromium.org mgiuca@chromium.org koz@chromium.org
 Issue 137687  has been merged into this issue.

Sign in to add a comment