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(web-react): Closing Modal by Escape key #1206

Closed
wants to merge 1 commit into from

Conversation

literat
Copy link
Collaborator

@literat literat commented Jan 5, 2024

Description

  • cancel event was not fired while closing dialog using escape key

Additional context

Issue reference

https://jira.lmc.cz/browse/DS-1108


Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Follow the PR Title/Commit Message Convention.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

  * `cancel` event was not fired while closing dialog using escape key
@literat literat requested review from pavelklibani and a team as code owners January 5, 2024 15:08
Copy link

netlify bot commented Jan 5, 2024

Deploy Preview for spirit-design-system-storybook ready!

Name Link
🔨 Latest commit e0f1638
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-storybook/deploys/65981b8c08813900081aa547
😎 Deploy Preview https://deploy-preview-1206--spirit-design-system-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the bug Something isn't working label Jan 5, 2024
Copy link

netlify bot commented Jan 5, 2024

Deploy Preview for spirit-design-system-demo canceled.

Name Link
🔨 Latest commit e0f1638
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-demo/deploys/65981b8cd7dc420008b1f4f7

Copy link

netlify bot commented Jan 5, 2024

Deploy Preview for spirit-design-system-validations canceled.

Name Link
🔨 Latest commit e0f1638
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-validations/deploys/65981b8cfaf18700084fdb1f

Copy link

netlify bot commented Jan 5, 2024

Deploy Preview for spirit-design-system-react ready!

Name Link
🔨 Latest commit e0f1638
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-react/deploys/65981b8c1c7f4e0008bc0733
😎 Deploy Preview https://deploy-preview-1206--spirit-design-system-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Jan 5, 2024

Coverage Status

coverage: 70.462% (-9.2%) from 79.697%
when pulling e0f1638 on fix/DS-1108-modal-chrome-esc
into cbe878b on main.

* Here should be used `cancel` event instead of `close` event.
* But when dialog is closed using `escape` key, `cancel` event is not fired.
*/
const EVENT_CANCEL = 'close';
Copy link
Contributor

@pavelklibani pavelklibani Jan 8, 2024

Choose a reason for hiding this comment

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

I was looking at this option to change cancel for close, but now if you close modal with close button on with backdrop click onClose method is called twice - from button/backdrop and from close event. Are we ok with that?

@crishpeen
Copy link
Member

Close as fixed elsewhere?

@literat
Copy link
Collaborator Author

literat commented Jan 18, 2024

This was fixed in a newer version of Chrome (between 216 and 234).

@literat literat closed this Jan 18, 2024
@literat literat deleted the fix/DS-1108-modal-chrome-esc branch January 18, 2024 13:26
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.

3 participants