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

🐛 Prevent Event Propagation to Other Widgets #358

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

MFA-X-AI
Copy link
Member

@MFA-X-AI MFA-X-AI commented Oct 7, 2024

Description

This PR adds event handling logic to fully stop keyboard event propagation (preventDefault(), stopPropagation(), stopImmediatePropagation()) in CustomActionEvent. This ensures key commands like Ctrl+Z only affect the active xircuits canvas and do not interfere with other JupyterLab widgets like text editors when they are not active.

References

#254

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

  1. Verify that Ctrl+Z, Ctrl+Y, etc., only impact the active Xircuits canvas.
  2. Confirm that no other JupyterLab widgets, such as the text editor, are affected by key commands while the Xircuits widget is focused.

Tested on?

  • Windows
  • Linux Ubuntu
  • Centos
  • Mac
  • Others (State here -> xxx )

@MFA-X-AI MFA-X-AI requested a review from treo October 7, 2024 13:28
Copy link

github-actions bot commented Oct 7, 2024

Binder 👈 Launch a binder notebook on branch XpressAI/xircuits/fahreza/propagation-bugfix

@MFA-X-AI MFA-X-AI merged commit dc4b639 into master Oct 7, 2024
9 checks passed
@MFA-X-AI MFA-X-AI deleted the fahreza/propagation-bugfix branch October 7, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants