Hide the form-switch transition/animation when the options page initializes the current values.

This commit is contained in:
Stefan Sundin 2025-12-22 22:03:37 -08:00
parent e444eab33c
commit 2270121d77
3 changed files with 10 additions and 1 deletions

View file

@ -82,6 +82,10 @@ pre {
white-space: pre-line;
}
.no-transitions * {
transition: none !important;
}
.table > caption {
color: var(--kpxc-text-color);
}

View file

@ -19,7 +19,7 @@
<script src="options.js"></script>
<script src="../common/translate.js" defer></script>
</head>
<body class="pt-3 pb-5">
<body class="pt-3 pb-5 no-transitions">
<div class="container-fluid">
<div class="row">
<nav class="col-md-3 col-lg-2 sidebar">

View file

@ -991,6 +991,11 @@ window.addEventListener('scroll', function() {
options.initCustomLoginFields();
options.initSitePreferences();
options.initAbout();
// The form-switch transitions should complete in 150 ms
setTimeout(() => {
document.body.classList.remove('no-transitions');
}, 200);
} catch (err) {
console.log('Error loading options page: ' + err);
}