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

Prevent search from closing when using a virtual keyboard #2667

Conversation

MarmadileManteater
Copy link
Contributor

Prevent search from closing when using a virtual keyboard

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Description

This PR adds a condition to the window resize event listener which prevents the search bar from closing unless the width of the page has changed. On mobile, the screen height may change when opening a virtual keyboard, but the screen width does not typically change. This change should prevent issues with the search bar closing when opening a virtual keyboard.

Screenshots

before (on Android in my fork)

after (on Android in my fork)

Desktop (please complete the following information):

  • OS: Windows 10
  • OS Version: Pro Version 21H2 Installed on ‎4/‎3/‎2022 OS build 19044.1889 Experience Windows Feature Experience Pack 120.2212.4180.0
  • FreeTube version: 0.17.1

Additional context

This would also effect Electron builds. I am open to modifying this PR to only change the existing behavior when IS_ELECTRON is false if that would make more sense.

from closing the search bar
@PrestonN PrestonN enabled auto-merge (squash) October 3, 2022 00:39
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Oct 3, 2022
@ChunkyProgrammer
Copy link
Member

ChunkyProgrammer commented Oct 3, 2022

Regarding Additional Context: This would probably also be benefitial for the pinephone which is supported by FreeTube as well as some laptops so I don't think this would need to check if IS_ELECTRON is false

Copy link
Member

@ChunkyProgrammer ChunkyProgrammer left a comment

Choose a reason for hiding this comment

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

LGTM

@PrestonN PrestonN merged commit 4a70726 into FreeTubeApp:development Oct 4, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Oct 4, 2022
@MarmadileManteater MarmadileManteater deleted the fix-search-disappearing-when-using-a-virtual-keyboard branch October 6, 2022 14:54
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