Skip to content
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

[BUG] Canvas Card Propagation #387

Open
iNanoToxin opened this issue Nov 21, 2024 · 0 comments
Open

[BUG] Canvas Card Propagation #387

iNanoToxin opened this issue Nov 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@iNanoToxin
Copy link

iNanoToxin commented Nov 21, 2024

Describe the bug
Pressing the run button inside a canvas card will force the card to enter edit mode. You need to add event.stopPropagation() inside the run code and clear output buttons.

To Reproduce
Steps to reproduce the behavior:

  1. Create a code snippet inside a canvas card.
  2. Select the canvas card.
  3. Press the run button.
  4. The card enters edit mode.

Expected behavior
The card will run the code and also enter edit mode at the same time (should not enter edit mode).

Screenshots
image

Additional context

this.clearButton.addEventListener("click", (event) => {
    event.stopPropagation();
    this.delete();
});
private createRunButton() {
    console.debug("Add run button");
    const button = document.createElement("button");
    button.classList.add(runButtonClass);
    button.setText(buttonText);
    button.addEventListener("click", (event) => {
        event.stopPropagation();
    });
    return button;
}
@iNanoToxin iNanoToxin added the bug Something isn't working label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant