Clicking a mailto link will replace the current back/forward history item if there's an entry in the forward list




7 years ago
4 months ago


(Reporter: Ehsan, Unassigned)


Firefox Tracking Flags

(Not tracked)





7 years ago

1. Make sure that Gmail is set up as your mailto handler, then open the test case in the URL field.
2. Click "page".
3. Go back.
4. Click "email".

The current history entry is replaced, and will remain in the forward list.  There is no way to get back to the test page.  Instead, the forward item should be replaced by the gmail page.

This is really annoying; it happened to me when I mistakenly clicked a mailto link on a bug page.

Comment 1

7 years ago
BTW, 3.6 shows the same behavior.
> 1. Make sure that Gmail is set up as your mailto handler

Set up where?  This part likely matters... With Thunderbird as my mailto handler set in OS prefs, I don't see the problem described here.
(In reply to comment #2)
> > 1. Make sure that Gmail is set up as your mailto handler
> Set up where?

Preferences->Applications->"mailto" in filter box->"Use gmail"
OK.  Any idea what code that ends up triggering?  I assume it's Firefox code, not core code...
That UI configures the mimeTypes.rdf entries used by uriloader/exthandler/nsHandlerService.js. Gmail is a nsIWebHandlerApp.
Uh... yes.  That does a load via the uriloader directly, without actually letting the docshell know anything about the load until it starts getting data.  So docshell doesn't get a chance to do the normal session history management it would do; as far as it can tell from the calls it gets the situation is no different from the load of the testcase page being a multipart/x-mixed-replace load (the first part is the actual testcase; the second part is gmail).

ccing the author of that code and the reviewers; why was this done as it was?

Comment 8

5 months ago
I can reproduce this in FF 56, and I suspect it's the same bug as these:

All three bug reports indicate that after clicking on the mailto link, the page that should be first in the back history list - i.e. the page with the mailto link on it – is no longer what you get when you click on the back button. The reporter of 499527 says explicitly that clicking the back button took him back to the page before the mailto link, and the reporter of 1223279 says that his back arrow was deactivated if he clicked a mailto link in a new tab (i.e. a tab with no back history) but not if he clicked a mailto link in an existing tab. Presumably he didn't try clicking the back arrow in the existing tab, or didn't notice that it took him back two pages instead of one.

I'm noting all this here because this reporter's description most accurately matches my experience: This bug only shows up for me if I have an entry in the forward history list for the tab in question.

One other detail: The page with the mailto link only disappears from the tab's back history; it's still available in the History dropdown list from the application menu.
See Also: → bug 499527
You need to log in before you can comment on or make changes to this bug.