-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import button can break due to animations #167
Comments
Investigating this right now - just writing down some findings here. Having at least one cookie not be removed seems to prevent the bug ( 😕 ?!). Tested by replacing the existing code that removes the cookies: cookie-editor/interface/popup/cookie-list.js Lines 322 to 326 in 0d88685
With the following (which instead removes all but one of the cookies): for (const cookieId of Object.keys(loadedCookies).slice(0, -1)) {
if (Object.prototype.hasOwnProperty.call(loadedCookies, cookieId)) {
removeCookie(loadedCookies[cookieId].cookie.name);
}
} Update 1 This in turn calls the cookie-editor/interface/popup/cookie-list.js Lines 1016 to 1026 in 0d88685
I'm guessing the two animations are fired in quick succession, first the Not sure how to go about fixing it yet, but looking into it 👍 |
I believe I figured it out. The issue is that the If we're not on the "main" ( I added a simple check that makes sure that we are on the main page. If we're not, we return early. function showNoCookies() {
if (disableButtons) {
return;
}
// Don't show the no-cookies message if we aren't on the correct page (e.g: if we're on the import page)
const pageTitle =
pageTitleContainer?.querySelector('h1')?.textContent ?? '';
if (pageTitle !== 'Cookie-Editor') {
return;
}
cookiesListHtml = null; It seems to work fine for me. |
Pressing the
Delete All
andImport
buttons in a quick succession with animations enabled can break the Import screen. Steps to reproduce:REQUIREMENT: you need a site with at least 2 cookies in it
Delete All
andImport
immediately after (Left Click on Delete All -> Tab -> Space
with the help of a keyboard makes it easier to reproduce)Cancel
andImport
buttons exist but there's no text field to write anything, forcing you toCancel
SHOWCASE:
Cookie-Editor.Import.animation.bug.mp4
The text was updated successfully, but these errors were encountered: