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

Block click event when editing #34

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Block click event when editing #34

merged 2 commits into from
Jan 28, 2025

Conversation

RyanLua
Copy link
Owner

@RyanLua RyanLua commented Jan 28, 2025

Description

Blocks the click event when editing so links or buttons don't trigger when clicking them.

Related Issues

Changes Made

  • Listen to the click event and stop the event from reaching

Checklist

  • I have tested these changes thoroughly.
  • I have reviewed my code for any potential errors or issues.
  • I have followed the code style guidelines for this project.

Additional Notes

Code of Conduct

By submitting this issue, I agree to follow the Code of Conduct.

Signed-off-by: Ryan Luu <ryan.luu@ryanluu.dev>
@RyanLua RyanLua added the bug Something isn't working label Jan 28, 2025
@RyanLua RyanLua requested a review from Copilot January 28, 2025 21:58
@RyanLua RyanLua self-assigned this Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/content.js:27

  • The new behavior of blocking clicks when the document body is in editable mode should be covered by tests to ensure it works as expected.
document.addEventListener('click', function (e) {
@RyanLua RyanLua merged commit 1d9f2cf into main Jan 28, 2025
4 checks passed
@RyanLua RyanLua deleted the block-clicking branch January 28, 2025 22:04
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

Successfully merging this pull request may close these issues.

1 participant