I agree that it would be good for Google to handle this the same way a
copy does. Previewing/testing the link from GMail draft always opens
another tab/window - at least in my experience - never a popup.
This was just a curiosity due to the inconvenience of NOT relying on the
draft Preview/Test,
Ah, I see it now...it's because GMail doesn't use an tag...it fakes it
and adds a click handler. Unfortunately there's not much you can do as a
user in this case (aside from copy/pasting the URL manually) - ideally
Gmail would fix their window.open to include noopener.
On Tue, May 9, 2023 at
That also does not work (in draft mode), but this is probably because it
does not have an href (and it probably uses the same code path as a normal
click), so a broken GMail implementation that breaks it.
☆*PhistucK*
On Tue, May 9, 2023 at 3:24 PM David Bokan wrote:
> Text fragments work just
Text fragments work just fine from `window.open` but have restrictions
about being isolated from other pages. I suspect gmail isn't adding
`noopener` in window.open so that the opened page remains reachable from
gmail.
If that's the case, your link should work if you ctrl/cmd-click the link or
Looks like the issue is that opening a URL with a scroll-to-fragment via
window.open(...) does not scroll/highlight. GMail uses window.open(...) in
draft mode.
Here is a small test case (copy it and paste it in the address bar and
click on both of the links) -
data:text/html,window.open
normal
When drafting a gmail with a link containing a *ScrollToTextFragment*, Duties
of Loyalty, Care and Obedience