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

fix(dialog): fixed a bug where opening dialogs with focused Forge elements that use the ripple could be misaligned #457

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

DRiFTy17
Copy link
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added/updated: N
  • Docs have been added/updated: N
  • Does this PR introduce a breaking change? N
  • I have linked any related GitHub issues to be closed when this PR is merged? N

Describe the new behavior?

Adds logic that runs after the dialog has completed animating open to attempt to fix the ripple alignment for focusable Forge elements that use a ripple.

This fix adds some slight overhead to the dialog, but it's the most seamless way to handle it at the moment for backwards compatibility. This code does not need to migrate to 3.0 and beyond due to our separation of the focus state and interaction state.

Additional information

This is a port of old logic we used to have in the 1.x version of this library. We originally removed it in 2.x because we added a JIT interaction handle for the ripple position, but the problem of the ripple being misaligned in dialogs (due to the scale animation) still exists for common things like using focus traps that set focus to the first focusable element immediately.

…ments that use the ripple could be misaligned
@DRiFTy17 DRiFTy17 requested a review from a team as a code owner January 23, 2024 15:50
Copy link

stackblitz bot commented Jan 23, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions bot added the patch Increment the patch version when merged label Jan 23, 2024
@DRiFTy17 DRiFTy17 added the skip-release Preserve the current version when merged label Feb 15, 2024
@DRiFTy17 DRiFTy17 merged commit f295124 into main Feb 15, 2024
8 checks passed
@DRiFTy17 DRiFTy17 deleted the fix/dialog-ripple-focus branch February 15, 2024 18:43
@github-actions github-actions bot added the released This issue/pull request has been released. label Feb 15, 2024
Copy link
Contributor

🚀 PR was released in v3.0.0-next.20 🚀

@github-actions github-actions bot added the prerelease This change relates to a prerelease. label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged prerelease This change relates to a prerelease. released This issue/pull request has been released. skip-release Preserve the current version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants