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

Closing nested drawer with esc causing Runtime error #335

Closed
mckhaannn opened this issue Apr 26, 2024 · 1 comment
Closed

Closing nested drawer with esc causing Runtime error #335

mckhaannn opened this issue Apr 26, 2024 · 1 comment

Comments

@mckhaannn
Copy link

Description

When closing nested drawers by quickly pressing the "esc" key, a TypeError related to getComputedStyle is thrown in the console. Although both drawers successfully close, this JavaScript error suggests potential issues with the UI's handling of rapid interactions.

Steps to Reproduce

  1. Open a nested drawer within the application.
  2. Quickly press the "esc" key multiple times in succession to close both the parent and child drawers.
  3. Observe the error in the JavaScript console despite the drawers closing as expected.

Expected Behavior

Both drawers should close smoothly without any JavaScript errors being logged in the console.

Actual Behavior

Both drawers close, but the following JavaScript error is logged:
Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
at ae (index.mjs:9:5384)
at eval (index.mjs:9:18234)

Environment

  • Browser: Chrome 123.0.0.0
  • OS: macOS Catalina 10.15.7
  • User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36

Additional Information

This error appears to occur specifically when the escape key is pressed rapidly before the nested drawer's animations complete. It might involve an issue where the targeted element for getComputedStyle is not in an expected state due to the rapid UI changes.

Any insights or fixes to prevent these errors would be greatly appreciated. Thank you!

Skarminspelning.2024-04-26.kl.09.05.12.mov
@joaom00
Copy link
Contributor

joaom00 commented May 4, 2024

Fixed by #309

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

No branches or pull requests

3 participants