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
disables page scroll when pressing spacebar #4204
disables page scroll when pressing spacebar #4204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments.
ui/component/app/view.jsx
Outdated
}; | ||
window.addEventListener('keydown', handleKeyPress); | ||
return () => window.removeEventListener('keydown', handleKeyPress); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second argument to this effect should be []
so it isn't re-ran on every render
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh good catch, thanks Sean! Updated
@@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). | |||
- Fix inconsistent relative-date string for claims, comments, etc. ([#4172](https://github.com/lbryio/lbry-desktop/pull/4172)) | |||
- Error opening certain files with special characters in name #2777 _community pr!_ ([#4161](https://github.com/lbryio/lbry-desktop/pull/4161)) | |||
- Comic-book file page shows download button first, and then viewer after download _community pr!_ ([#4161](https://github.com/lbryio/lbry-desktop/pull/4161)) | |||
- Prevents page from scrolling while pressing the spacebar when the miniplayer is out of focus _community pr!_ ([#4204](https://github.com/lbryio/lbry-desktop/pull/4204)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this up to the unreleased section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's already under the unreleased section, did you want me to move it from Fixed
to Changed
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. I didn't realize it was already in the correct section.
@seanyesmunt I just wanted to check in when you have a sec. I updated and pushed up the |
Nope. Sorry we've been pretty busy with paid content on lbry.tv. I'll give this another pass/merge later tonight or tomorrow morning. |
Sounds good, no rush! |
@cassidypignatello Can you please rebase this? It looks like it includes a lot of changes that have already been merged to master. |
8e8f4f1
to
788c7cf
Compare
@seanyesmunt No problem, I just rebased this. Let me know if you need anything else! |
PR Checklist
Please check all that apply to this PR using "x":
PR Type
What kind of change does this PR introduce?
Fixes
Issue Number: #3870
What is the current behavior?
If playing a video and then navigating to a new page to cause the miniplayer to appear out of focus, pressing spacebar causes the video to pause and the page to scroll down in the background.
What is the new behavior?
Ensures that pressing spacebar only pauses the video on the miniplayer and doesn't cause the page to scroll.
Other information