hamsket icon indicating copy to clipboard operation
hamsket copied to clipboard

[GMAIL] Clicking a link in Hamsket open a blank window

Open blackdevil72 opened this issue 5 years ago • 10 comments

Hello since last update on Archlinux Chaotic AUR https://lonewolf.pedrohlc.com/chaotic-aur/ to last build links clicked inside gmail in hamsket open a blank window instead of opening in the default webbrowser. As far as I've tested it only does it for gmail.

Capture d’écran du 2020-03-05 03-48-27

-
> Hamsket 0.6.0
> Electron 8.0.3
> linux x64 5.5.7-arch1-1
> f347f53  (HEAD -> master, tag: nightly, origin/master, origin/HEAD) Tue, 3 Mar 2020 11:57:22 -0800

blackdevil72 avatar Mar 05 '20 02:03 blackdevil72

Same here on Win10 :

Version: 0.6.0
Plateforme: win32 (x64)
Electron: 8.0.3
Chromium: 80.0.3987.134
Node: 12.13.0
BuildVersion: f347f53 (grafted, HEAD, tag: nightly, origin/master) Tue, 3 Mar 2020 11:57:22 -0800

AurelienVernay avatar Mar 11 '20 15:03 AurelienVernay

Changed the title to reflect that.

blackdevil72 avatar Mar 11 '20 16:03 blackdevil72

Which is the last build to work?

And I see this, clearing the storage for the tab then refreshing should get to the login prompt. If it shows a greeting page with "sign in" at the top, it's cookies telling it to do that.

This needs the revamped URL handling, but that largely needs a switch to browserview which is a huge change from webview.

TheGoddessInari avatar Mar 11 '20 19:03 TheGoddessInari

Heya!

For me it still worked with the last nightly at commit f98f084. Maybe commit 3d16baa is the problem? because when I build from it the problem appear.

Console log at each click:

focus-change for guestInstanceId: 3

Unfortunately clearing the local storage did nothing. the new window is still call "_blank".

Whatever the solution is take your time don't rush. I think we can wait a bit its an annoyance but not a software breaking bug.

Full console log from latest version :

[nekosan@dashie ~]$ hamsket
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false".  It will change to be "true" in Electron 9.  For more information please check https://github.com/electron/electron/issues/18397
focus-change for guestInstanceId: 3
focus-change for guestInstanceId: 3
[nekosan@dashie ~]$

blackdevil72 avatar Mar 12 '20 10:03 blackdevil72

Oh wait, I was reading this wrong. Sorry about that.

Yeah, it's apparently because of the Firefox user agent. I'm looking into it.

TheGoddessInari avatar Mar 12 '20 16:03 TheGoddessInari

Adding some new element to that.

Doing right click then "open link" produce the normal behavior. Only left clicking on a link produce the new "blank" window.

blackdevil72 avatar Mar 25 '20 13:03 blackdevil72

That's expected; the right click menu (which I forked from other software to suit Hamsket's needs) doesn't go through the normal procedure.

What's supposed to happen is that window.open, external links, and the like get intercepted by the new-window event handler, and if it's not one of the exceptions, it's sent to the default system browser.

Somehow, with the Firefox user-agent, Google links are getting past that, and other attempts to rectify the user agent mess haven't worked.

TheGoddessInari avatar Mar 26 '20 00:03 TheGoddessInari

Ctrl-clicking will correctly open such links in a browser tab but goddamn is it annoying. Don’t take that as criticism though @TheGoddessInari, you’re doing great work!

flying-sheep avatar Apr 17 '20 11:04 flying-sheep

This should be fixed with 4508c9e.

TheGoddessInari avatar Jul 31 '20 01:07 TheGoddessInari

Working for me right now. I'll keep monitoring for a bit.

blackdevil72 avatar Jul 31 '20 19:07 blackdevil72