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 ft-share-button when the window width is below 900 #6492

Merged

Conversation

MarmadileManteater
Copy link
Contributor

Fix ft-share-button when the window width is below 900

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Description

The ft-share-button doesn't show its prompt properly when the window width is below 900. The handleDropdownFocusOut function is called when the prompt is shown causing it to immediately hide. The result is that it seems like the ft-share-button doesn't work on mobile. This PR addresses this by adding a check to the handleDropdownFocusOut function to not hide the dropdown if useModal is true.

Screenshots

before after
before after

Testing

  1. Find a video (or channel)
  2. Reduce window width to below 900
  3. Click the share icon
  4. Make sure the share prompt opens

Opening modal causes focus change, so if you close modal on focus out, it won't open modal
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 31, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 31, 2024 20:58
@FreeTubeBot FreeTubeBot merged commit 0ef4a01 into FreeTubeApp:development Dec 31, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 31, 2024
SuperAKWA pushed a commit to SuperAKWA/FreeTube that referenced this pull request Jan 24, 2025
Opening modal causes focus change, so if you close modal on focus out, it won't open modal
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

Successfully merging this pull request may close these issues.

5 participants