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: close menu popovers when clicking inside preview pane #301

Conversation

aganglada
Copy link
Collaborator

What:

This PR fixes #243

Why:

The way the browser work is how it's behaving, but it's a bit annoying to have popovers hanging around when clicking on the preview. Specially because the end user doesn't know that's an iframe.

How:

Attaching a listener to the iframe and propagating a mousedown on the body of the current window.

Nov-16-2020 16-42-29

Checklist:

  • Tests. N/A
  • Ready to be merged

@aganglada aganglada added the bug Something isn't working label Nov 16, 2020
@aganglada aganglada requested a review from smeijer November 16, 2020 16:49
@aganglada aganglada self-assigned this Nov 16, 2020
Copy link
Member

@smeijer smeijer left a comment

Choose a reason for hiding this comment

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

Thanks! Looking great.

@smeijer smeijer changed the title Fixed clicking on iframe does not close menu popover fix: close menu popovers when clicking inside preview pane Nov 16, 2020
@smeijer smeijer merged commit 8dbe6ff into testing-library:develop Nov 16, 2020
@aganglada aganglada deleted the bug/clicking-on-iframe-doesnt-close-menu branch November 16, 2020 19:03
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.

Clicking on Preview pane does not close any menu like playground or settings on develop environment
2 participants