{{ message }}
fix : make the KeyHandler work in the Validation story#1027
Merged
redfish4ktc merged 6 commits intoMay 5, 2026
Conversation
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/html/stories/Validation.stories.ts (1)
186-188: Consider focusing the iframe window before focusing the containerIn Storybook iframe scenarios,
container.focus()alone can still be flaky for keyboard delivery. Addwindow.focus()in the same click handler for better reliability.Based on learnings: "KeyHandler issues in Storybook are due to iframe isolation - ... ensure the iframe window has focus by calling window.focus() and focusing the target element in the preview configuration or story setup."Suggested patch
- container.addEventListener('click', () => { - container.focus(); - }) + container.addEventListener('click', () => { + window.focus(); + container.focus(); + });
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 05861f1c-e2e2-4b42-91c9-21be26ab003b
📒 Files selected for processing (1)
packages/html/stories/Validation.stories.ts
13 tasks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




PR Checklist
maxGraph, and you are assigned to the issue.packages/core/_tests_or a new or altered Storybook story inpackages/html/stories(an existing story may also demonstrate the change).Overview
In stories involving keyboard events, they don't seem to be registered and propagated to the graph container, and are thus not handled.
This pull request is intended to cover #910, although this issue is present on all stories which involve the handling of keyboard events by the graph.
Analysis
containerHTML element linked to the graph has no tabindex attribute.Notes
Keywords
Covers #910
Summary by CodeRabbit
New Features
Accessibility