Commit 9c21fcde authored by WofWca's avatar WofWca
Browse files

fix: don't play checkbox transitions on popup open

parent c849550b
Pipeline #42207 passed with stage
in 1 minute and 13 seconds
......@@ -6,6 +6,11 @@ body {
font-size: 12px;
}
.no-transitions *, .no-transitions *::before, .no-transitions *::after {
transition: none !important;
-webkit-transition: none !important;
}
#active {
margin: 20px 0;
text-align: center;
......
......@@ -15,6 +15,11 @@ class Popup {
* @param {() => void} [onRunInBackgroundChange]
*/
constructor(getMsgFunc, changeFunc, retryFunc, onRunInBackgroundChange) {
// A stupid and unreliable way to disable transitions until the state
// has been initialized.
document.body.classList.add('no-transitions');
setTimeout(() => document.body.classList.remove('no-transitions'), 100);
this.getMsgFunc = getMsgFunc;
this.enabled = document.getElementById('enabled');
this.enabled.addEventListener('change', changeFunc);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment