Fixed instant loading causing jump for code annotations

This commit is contained in:
squidfunk 2023-05-02 10:59:39 +02:00
parent 5c57458256
commit 201054e79d
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
6 changed files with 25 additions and 51 deletions

View File

@ -240,7 +240,7 @@
</script> </script>
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/bundle.dd423ef8.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/bundle.fac441b0.min.js' | url }}"></script>
{% for path in config.extra_javascript %} {% for path in config.extra_javascript %}
<script src="{{ path | url }}"></script> <script src="{{ path | url }}"></script>
{% endfor %} {% endfor %}

51
package-lock.json generated
View File

@ -31,11 +31,11 @@
"@types/fuzzaldrin-plus": "^0.6.2", "@types/fuzzaldrin-plus": "^0.6.2",
"@types/html-minifier": "^4.0.2", "@types/html-minifier": "^4.0.2",
"@types/lunr": "^2.3.4", "@types/lunr": "^2.3.4",
"@types/node": "^18.16.3", "@types/node": "^18.16.1",
"@types/resize-observer-browser": "^0.1.7", "@types/resize-observer-browser": "^0.1.7",
"@types/sass": "^1.45.0", "@types/sass": "^1.45.0",
"@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.2", "@typescript-eslint/parser": "^5.59.1",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"cssnano": "5.1.0", "cssnano": "5.1.0",
@ -61,12 +61,12 @@
"preact": "^10.13.2", "preact": "^10.13.2",
"rimraf": "^5.0.0", "rimraf": "^5.0.0",
"sass": "^1.62.1", "sass": "^1.62.1",
"simple-icons": "^8.12.1", "simple-icons": "^8.11.0",
"stylelint": "^15.6.0", "stylelint": "^15.6.0",
"stylelint-config-recess-order": "^4.0.0", "stylelint-config-recess-order": "^4.0.0",
"stylelint-config-recommended": "^12.0.0", "stylelint-config-recommended": "^12.0.0",
"stylelint-config-standard-scss": "^9.0.0", "stylelint-config-standard-scss": "^9.0.0",
"stylelint-scss": "^5.0.0", "stylelint-scss": "^4.6.0",
"svgo": "3.0.0", "svgo": "3.0.0",
"tiny-glob": "^0.2.9", "tiny-glob": "^0.2.9",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
@ -9333,21 +9333,6 @@
} }
} }
}, },
"node_modules/stylelint-config-recommended-scss/node_modules/stylelint-scss": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.7.0.tgz",
"integrity": "sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg==",
"dev": true,
"dependencies": {
"postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1",
"postcss-selector-parser": "^6.0.11",
"postcss-value-parser": "^4.2.0"
},
"peerDependencies": {
"stylelint": "^14.5.1 || ^15.0.0"
}
},
"node_modules/stylelint-config-standard": { "node_modules/stylelint-config-standard": {
"version": "33.0.0", "version": "33.0.0",
"resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz",
@ -9393,9 +9378,9 @@
} }
}, },
"node_modules/stylelint-scss": { "node_modules/stylelint-scss": {
"version": "5.0.0", "version": "4.7.0",
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.7.0.tgz",
"integrity": "sha512-5Ee5kG3JIcP2jk2PMoFMiNmW/815V+wK5o37X5ke90ihWMpPXI9iyqeA6zEWipWSRXeQc0kqbd7hKqiR+wPKNA==", "integrity": "sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"postcss-media-query-parser": "^0.2.3", "postcss-media-query-parser": "^0.2.3",
@ -17162,20 +17147,6 @@
"postcss-scss": "^4.0.6", "postcss-scss": "^4.0.6",
"stylelint-config-recommended": "^12.0.0", "stylelint-config-recommended": "^12.0.0",
"stylelint-scss": "^4.6.0" "stylelint-scss": "^4.6.0"
},
"dependencies": {
"stylelint-scss": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.7.0.tgz",
"integrity": "sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg==",
"dev": true,
"requires": {
"postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1",
"postcss-selector-parser": "^6.0.11",
"postcss-value-parser": "^4.2.0"
}
}
} }
}, },
"stylelint-config-standard": { "stylelint-config-standard": {
@ -17208,9 +17179,9 @@
} }
}, },
"stylelint-scss": { "stylelint-scss": {
"version": "5.0.0", "version": "4.7.0",
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.0.0.tgz", "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-4.7.0.tgz",
"integrity": "sha512-5Ee5kG3JIcP2jk2PMoFMiNmW/815V+wK5o37X5ke90ihWMpPXI9iyqeA6zEWipWSRXeQc0kqbd7hKqiR+wPKNA==", "integrity": "sha512-TSUgIeS0H3jqDZnby1UO1Qv3poi1N8wUYIJY6D1tuUq2MN3lwp/rITVo0wD+1SWTmRm0tNmGO0b7nKInnqF6Hg==",
"dev": true, "dev": true,
"requires": { "requires": {
"postcss-media-query-parser": "^0.2.3", "postcss-media-query-parser": "^0.2.3",

View File

@ -61,11 +61,11 @@
"@types/fuzzaldrin-plus": "^0.6.2", "@types/fuzzaldrin-plus": "^0.6.2",
"@types/html-minifier": "^4.0.2", "@types/html-minifier": "^4.0.2",
"@types/lunr": "^2.3.4", "@types/lunr": "^2.3.4",
"@types/node": "^18.16.3", "@types/node": "^18.16.1",
"@types/resize-observer-browser": "^0.1.7", "@types/resize-observer-browser": "^0.1.7",
"@types/sass": "^1.45.0", "@types/sass": "^1.45.0",
"@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.2", "@typescript-eslint/parser": "^5.59.1",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.14",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"cssnano": "5.1.0", "cssnano": "5.1.0",
@ -91,12 +91,12 @@
"preact": "^10.13.2", "preact": "^10.13.2",
"rimraf": "^5.0.0", "rimraf": "^5.0.0",
"sass": "^1.62.1", "sass": "^1.62.1",
"simple-icons": "^8.12.1", "simple-icons": "^8.11.0",
"stylelint": "^15.6.0", "stylelint": "^15.6.0",
"stylelint-config-recess-order": "^4.0.0", "stylelint-config-recess-order": "^4.0.0",
"stylelint-config-recommended": "^12.0.0", "stylelint-config-recommended": "^12.0.0",
"stylelint-config-standard-scss": "^9.0.0", "stylelint-config-standard-scss": "^9.0.0",
"stylelint-scss": "^5.0.0", "stylelint-scss": "^4.6.0",
"svgo": "3.0.0", "svgo": "3.0.0",
"tiny-glob": "^0.2.9", "tiny-glob": "^0.2.9",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",

View File

@ -222,7 +222,10 @@ export function mountAnnotation(
takeUntil(done$), takeUntil(done$),
filter(ev => !(ev.metaKey || ev.ctrlKey)) filter(ev => !(ev.metaKey || ev.ctrlKey))
) )
.subscribe(ev => ev.preventDefault()) .subscribe(ev => {
ev.stopPropagation()
ev.preventDefault()
})
/* Allow to open link in new tab or blur on close */ /* Allow to open link in new tab or blur on close */
fromEvent<MouseEvent>(index, "mousedown") fromEvent<MouseEvent>(index, "mousedown")