You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In static\js\theme.js, function initAnchorClipboard() creates the link for a heading that can be copied into clipboard.
In line 264, document.location.origin and document.location.pathname are concatenated to build the URL. Alas, origin is null in Firefox which represents a ten year old bug.
But there's an easy workaround available: document.location.href is the result when concatenating the two other properties. So line 264 could simply consist of this:
var url = encodeURI(document.location.href);
The text was updated successfully, but these errors were encountered:
I will take a look into it. Sadly it may be not that easy as document.location.href may also contain the fragment specifier which we explicitly don't want to have here.
McShelby
changed the title
"Add link to clipboard" not working in Firefox when content is served from filesystem
anchor: fix link in FF when served from filesystem
Feb 20, 2023
In
static\js\theme.js
, functioninitAnchorClipboard()
creates the link for a heading that can be copied into clipboard.In line 264,
document.location.origin
anddocument.location.pathname
are concatenated to build the URL. Alas,origin
is null in Firefox which represents a ten year old bug.But there's an easy workaround available:
document.location.href
is the result when concatenating the two other properties. So line 264 could simply consist of this:var url = encodeURI(document.location.href);
The text was updated successfully, but these errors were encountered: