mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-02 11:42:39 +00:00
🐛 Fix: APlayer invades the click event of the anchor links, resulting in invalid Chinese anchor links scrolling (#292)
This commit is contained in:
@@ -20,6 +20,7 @@ All notable changes to this project will be documented in this file.
|
||||
- :bug: Fix: missing parameter `requiredFields` for Valine
|
||||
- :bug: Fix: js.build is executed after fingerprint, resulting in the destruction of js integrity
|
||||
- :bug: Fix: toc fails when the toc aside is on the left
|
||||
- :bug: Fix: APlayer invades the click event of the anchor links, resulting in invalid Chinese anchor links scrolling ([#292](https://github.com/hugo-fixit/FixIt/issues/292))
|
||||
- :recycle: Refactor: image lazy loading ([#283](https://github.com/hugo-fixit/FixIt/pull/283))
|
||||
- :recycle: Refactor: author's avatar of post or profile ([#288](https://github.com/hugo-fixit/FixIt/pull/288))
|
||||
- :art: Style: fix `#comments` css style conflict ([#269](https://github.com/hugo-fixit/FixIt/issues/269))
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7
-1
@@ -612,10 +612,16 @@ class FixIt {
|
||||
* init table of contents
|
||||
*/
|
||||
initToc() {
|
||||
const $tocCore = document.getElementById('TableOfContents');
|
||||
let $tocCore = document.getElementById('TableOfContents');
|
||||
if ($tocCore === null) {
|
||||
return;
|
||||
}
|
||||
// It's a dirty hack to fix the bug of APlayer, see https://github.com/hugo-fixit/FixIt/issues/292
|
||||
if (typeof APlayer === 'function') {
|
||||
const $newTocCore = $tocCore.cloneNode(true);
|
||||
$tocCore.parentElement.replaceChild($newTocCore, $tocCore);
|
||||
$tocCore = $newTocCore;
|
||||
}
|
||||
if (document.getElementById('toc-static').dataset.kept === true || this.util.isTocStatic()) {
|
||||
const $tocContentStatic = document.getElementById('toc-content-static');
|
||||
if ($tocCore.parentElement !== $tocContentStatic) {
|
||||
|
||||
Reference in New Issue
Block a user