Hide the form-switch animation when the options page loads the initial values (#2807)

Hide the form-switch transition/animation when the options page initializes the current values.
This commit is contained in:
Stefan Sundin 2026-02-05 01:01:57 -08:00 committed by GitHub
parent 8b71dbc30f
commit 58beb79927
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 1 deletions

View file

@ -82,6 +82,10 @@ pre {
white-space: pre-line;
}
.no-transitions .form-check-input {
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);
}