Skip to content

fix safari download dropdown not getting closed #2600

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

Conversation

PiyushChandra17
Copy link
Contributor

Fixes #2578

Changes:

Made the following changes:

  • imported react-outside-click-handler npm package
  • We need to check first if browser is Safari
  • If the browser is Safari , then render OutsideClickHandler and set optionsOpen state to false when clicking outside
  • Voila, worked like a charm!
safari-fix.mov

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@lindapaiste
Copy link
Collaborator

lindapaiste commented Nov 13, 2023

Interesting. I will look into what this package is doing behind the scenes.

If Safari click handling is a problem in this component then it’s probably a problem in other components. Unless this component is handling it differently. I recall there being two different approaches to outside click handling throughout the app. One of those two methods might be the cause of the Safari problems. We’re implementing each of those codes in multiple places. We definitely want to centralize things like this as much as possible. I also recall that I have at least one pending PR which touches on this.

@lindapaiste
Copy link
Collaborator

I have to refresh my memory on all this but definitely #2309 and #2379 are related.

@raclim raclim added the Bug Error or unexpected behaviors label Jan 26, 2024
@raclim
Copy link
Collaborator

raclim commented Jan 26, 2024

Closing with reasons outlined in #2578 (comment)!

@raclim raclim closed this Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behaviors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In Safari browser, sketches table download dropdown option is not getting closed when clicking another dropdown or clicking outside the table
3 participants